| От | Tom Lane |
|---|---|
| Тема | Re: about data type id |
| Дата | |
| Msg-id | 17489.1040709223@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: about data type id ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
| Список | pgsql-hackers |
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> 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
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера