Re: Getting the type Oid in a CREATE TYPE output function ..
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Getting the type Oid in a CREATE TYPE output function .. |
| Дата | |
| Msg-id | 11252.1160670403@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Getting the type Oid in a CREATE TYPE output function .. (Weslee Bilodeau <weslee.bilodeau@hypermediasystems.com>) |
| Ответы |
Re: Getting the type Oid in a CREATE TYPE output function
|
| Список | pgsql-hackers |
Weslee Bilodeau <weslee.bilodeau@hypermediasystems.com> writes:
> I'm trying to create a few new types, and based on the type in/out
> functions will operate a bit differently.
> For the input function finding the type Oid is easy -
> Oid our_type_oid = PG_GETARG_OID(1);
> For output though I'm having difficulty finding out the type Oid.
You can't, and if you could, relying on it would be a security hole
in your function (somebody could invoke the function manually and pass
it a false OID value). You have to put everything you need to know
right into the Datum.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера