Received: from sss.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id NAA24198 for ; Mon, 16 Aug 1999 13:35:43 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.sss.pgh.pa.us (8.9.1/8.9.1) with ESMTP id NAA01613; Mon, 16 Aug 1999 13:35:02 -0400 (EDT) To: Stuart Rison cc: mdalphin@amgen.com, pgsql-sql@postgreSQL.org, jwieck@debis.com Subject: Re: [SQL] Anyone recognise this error from PL/pgSQL? In-reply-to: Your message of Mon, 16 Aug 1999 15:57:27 +0100 Date: Mon, 16 Aug 1999 13:35:02 -0400 Message-ID: <1611.934824902@sss.pgh.pa.us> From: Tom Lane Stuart Rison 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