Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[GENERAL] change of oid values?

0 views
Skip to first unread message

Yadira Lizama Mue

unread,
Nov 25, 2009, 1:49:35 PM11/25/09
to
Hi,
I'd like to know if the values of postgres's Oids can changes its values for the same object. I want to use them in my aplication, but I'm afraid they could change and I get errors.

I use the field Oid of table pg_type to identify the type of a field in a query. It could bring me errors in the future? For example, the oid value associated to type int4 could change at any future time?

Regards,
Yadira

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

Thom Brown

unread,
Nov 25, 2009, 2:00:27 PM11/25/09
to
2009/11/25 Yadira Lizama Mue <yli...@uci.cu>

Hi,
 I'd like to know if the values of postgres's Oids can changes its values for the same object. I want to use them in my aplication, but I'm afraid they could change and I get errors.

I use the field Oid of table pg_type to identify the type of a field in a query. It could bring me errors in the future? For example, the  oid value associated to type int4 could change at any future time?

Regards,
Yadira


Why don't you just use pg_typeof() to get the type?  And if you want the oid of the type, just do: pg_typeof(fieldname)::oid.

Regards

Thom
0 new messages