X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B5267563BD for ; Mon, 7 Mar 2005 14:35:57 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75476-01 for ; Mon, 7 Mar 2005 14:35:55 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 5D7E656382 for ; Mon, 7 Mar 2005 14:35:54 +0000 (GMT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j27EZijb022995; Mon, 7 Mar 2005 09:35:45 -0500 (EST) To: Radtchenko Igor Cc: pgsql-admin@postgresql.org Subject: Re: Build from file syntax troublem (part II). In-reply-to: <936719781.20050307132147@komi.parma.ru> References: <05030601450100.01195@inta> <27861.1110065906@sss.pgh.pa.us> <936719781.20050307132147@komi.parma.ru> Comments: In-reply-to Radtchenko Igor message dated "Mon, 07 Mar 2005 13:21:47 +0300" Date: Mon, 07 Mar 2005 09:35:44 -0500 Message-ID: <22994.1110206144@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/83 X-Sequence-Number: 16581 Radtchenko Igor writes: > But now, after I've installed 8.0.1, it says things as examples in > little attach. > freenibs=# CREATE FUNCTION public.if(int4, int4, int4) RETURNS int4 AS ' > freenibs'# DECLARE > freenibs'# expr1 ALIAS FOR $1; > freenibs'# expr2 ALIAS FOR $2; > ... > freenibs'# END; > freenibs'# ' LANGUAGE 'sql' VOLATILE; > ERROR: syntax error at or near "ALIAS" at character 78 > LINE 3: expr1 ALIAS FOR $1; That's a plpgsql function, not an sql function. Your other examples look like they were taken from some other database that has different extensions to the SQL spec than we do: there is no "varchar binary" in Postgres, and we don't allow you to add random commas at the ends of column lists. PG isn't going to like '0000-00-00' for a date, either. regards, tom lane