1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-14 18:42:34 +03:00

Add pg_typeof() function.

Brendan Jurd
This commit is contained in:
Tom Lane
2008-11-03 17:51:13 +00:00
parent 06c22d7f51
commit b8fab2411d
7 changed files with 100 additions and 7 deletions

View File

@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.64 2008/10/05 17:33:16 petere Exp $
* $PostgreSQL: pgsql/src/backend/utils/adt/misc.c,v 1.65 2008/11/03 17:51:13 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@ -371,3 +371,13 @@ pg_get_keywords(PG_FUNCTION_ARGS)
SRF_RETURN_DONE(funcctx);
}
/*
* Return the type of the argument.
*/
Datum
pg_typeof(PG_FUNCTION_ARGS)
{
PG_RETURN_OID(get_fn_expr_argtype(fcinfo->flinfo, 0));
}