From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Return type bug in functions |
Date: | 2003-05-11 14:12:54 |
Message-ID: | 13035.1052662374@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-05-11 14:45:38 | problem building tablefunc in 7.4 |
Previous Message | Christopher Kings-Lynne | 2003-05-11 10:59:31 | Return type bug in functions |