Re: [SQL] Anyone recognise this error from PL/pgSQL?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [SQL] Anyone recognise this error from PL/pgSQL?
Дата
Msg-id 1611.934824902@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [SQL] Anyone recognise this error from PL/pgSQL?  (Stuart Rison <stuart@ludwig.ucl.ac.uk>)
Ответы Re: [SQL] Anyone recognise this error from PL/pgSQL?  (Stuart Rison <stuart@ludwig.ucl.ac.uk>)
Список pgsql-sql
Stuart Rison <stuart@ludwig.ucl.ac.uk> writes:
> CREATE FUNCTION test(int2) RETURNS int2 AS '
> SELECT field2 FROM test
>     WHERE field1=$1;
> ' language 'sql';
> ERROR:  There is no operator '=$' for types 'int2' and 'int4'

That case is ambiguous: is it field1 =$ 1 or field1 = $1 ?  ("=$" is a
legal operator name according to Postgres.)  So I don't have a problem
with disallowing that.  But field1=NEW is not ambiguous under the
Postgres lexical rules, and plpgsql shouldn't be creating an
ambiguity...
        regards, tom lane


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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: [SQL] Anyone recognise this error from PL/pgSQL?
Следующее
От: Stuart Rison
Дата:
Сообщение: Re: [SQL] Anyone recognise this error from PL/pgSQL?