Re: My error or parser bug? re stored function [SEC=UNCLASSIFIED]

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: My error or parser bug? re stored function [SEC=UNCLASSIFIED]
Дата
Msg-id 29057.1297440182@sss.pgh.pa.us
обсуждение исходный текст
Ответ на My error or parser bug? re stored function [SEC=UNCLASSIFIED]  ("Pilling, Michael" <Michael.Pilling@dsto.defence.gov.au>)
Список pgsql-novice
"Pilling, Michael" <Michael.Pilling@dsto.defence.gov.au> writes:
> Hi, I'm new to postgres but not to SQL, and have not been able to this stored function to compile:

FWIW, I get completely different errors than you do when I paste these
examples into psql:

ERROR:  syntax error at or near "voice_spelling"
LINE 5:  IF EXISTS( voice_spelling( $1, $2, $3, $4  ) ) THEN
                    ^

ERROR:  syntax error at or near "voice_spelling"
LINE 5:  IF EXISTS( voice_spelling( abbreviation, context, tts_engin...
                    ^

These errors make sense to me because the argument of EXISTS() has to
be a sub-SELECT.  I'm not sure what you're expecting EXISTS to do with a
function call.

As far as the errors you actually got, it's difficult to say for sure
without any context like what PG version this is or what client-side
software you were using.  The formatting you show for the errors sure
doesn't look like psql, though.  First guess is that you were passing
the SQL code through something that thinks it knows SQL syntax but
doesn't cope well with dollar-quoted strings, or something like that.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Maximilian Tyrtania
Дата:
Сообщение: Re: Make pgAdmin default "Not NULL" checkbox to ON
Следующее
От: matty jones
Дата:
Сообщение: Re: table design