From: | Alexander Reichstadt <lxr(at)mac(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Question on datatypes returned for "select oid, typname from pg_type" |
Date: | 2012-03-09 19:47:03 |
Message-ID: | B8D35EFE-1410-4F8C-815B-982171D2E7A9@mac.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi all,
for an API I want to make some changes to, I need to know the datatype being used for a record's column. In fact the entire record is to be transferred into a dictionary. From my web research I came to use
select oid, typname from pg_type
to find out what datatypes exist. When checking on a certain field, it returned 17 as a type, thus being a bytea. That's actually the question now, because, is it always that bytea gets oid 17 or are these assignments of type name and oid dependent on the database installation, version of pg or whatever else I might be missing? I would prefer to hardcode how these numbers are interpreted for performance reasons, so even if they do depend on other criteria, my next question would be how often throughout pg-history did they change, if they do not depend on the individual installation.
Thank you in advance for clarifying.
Alex
From | Date | Subject | |
---|---|---|---|
Next Message | Randy Ficker | 2012-03-09 20:12:29 | Re: 9.1 causing "out of shared memory" error and higher serialization conflicts |
Previous Message | Francisco Figueiredo Jr. | 2012-03-09 18:36:13 | Re: 9.1 causing "out of shared memory" error and higher serialization conflicts |