| От | Tom Lane |
|---|---|
| Тема | Re: Return type bug in functions |
| Дата | |
| Msg-id | 13035.1052662374@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Return type bug in functions (Christopher Kings-Lynne <chriskl@familyhealth.com.au>) |
| Список | pgsql-hackers |
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> test=# create function foo() returns integer as 'select 1;' language
> 'sql';
> CREATE FUNCTION
> test=# create function foo2() returns "integer" as 'select 1;' language
> 'sql';
> ERROR: Type "integer" does not exist
> Why can't you quote return types?
Because "integer" is not the actual internal name of the type.
> Isn't that inconsistent with the rest of Postgres?
No; you can't quote it anywhere else either. Nor can you quote it in
the SQL standard: INTEGER is a key word, not an identifier.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера