Search Postgresql Archives

Getting the oid of an anyelement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If I've got a function (sql or plpgsql) that takes anyelement as a param, how do I determine the type name or oid that was actually passed in? I figure there is probably a function for this but darn if I can find it.

Specifically, I'm trying to make a function like Oracle's dump that will take anything as input and return the internal representation of it. So I want to determine what type was passed in and call the appropriate send function.

 SELECT dump(current_date);

 dump
 ------------------------------------------
 Type=date OID=1082 Len=4 Data=(0,0,13,212)

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux