Search Postgresql Archives

Re: Question on datatypes returned for "select oid, typname from pg_type"

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

 



Alexander Reichstadt <lxr@xxxxxxx> writes:
> 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?

The built-in data types have hand-assigned OIDs, as depicted in
src/include/catalog/pg_type.h.  While those aren't quite
guaranteed-frozen, we've never changed one that I can recall, and are
not very likely to in the future.  However, any type that's not built-in
has an OID that will vary across databases.  As a rule of thumb,
you could assume that any OID under 10000 is hand-assigned and won't
change.

			regards, tom lane

-- 
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