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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)uk>
Cc: mdalphin(at)amgen(dot)com, pgsql-sql(at)postgreSQL(dot)org, jwieck(at)debis(dot)com
Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL?
Date: 1999-08-16 17:35:02
Message-ID: 1611.934824902@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Stuart Rison <stuart(at)ludwig(dot)ucl(dot)ac(dot)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

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stuart Rison 1999-08-16 18:28:56 Re: [SQL] Anyone recognise this error from PL/pgSQL?
Previous Message Pham, Thinh 1999-08-16 16:02:20 datediff function