"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes: > Try: SELECT oid FROM pg_type WHERE typname='text';
Another possibility (as of 7.3) is regression=# select 'int4'::regtype::oid; oid ----- 23 (1 row) The regtype converter has the advantage that it will recognize any typename construct understood by the parser, for example regression=# select 'character varying'::regtype::oid; oid ------ 1043 (1 row) Also, regtype will do the right thing in the presence of schema-related ambiguities (eg, 'a.foo' and 'b.foo' may both exist in the catalog, but if only b is in your search path, 'foo' should mean 'b.foo'). regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])