From: Tom Lane <tgl@sss.pgh.pa.us>
To: Radtchenko Igor <inta@komi.parma.ru>
Cc: pgsql-admin@postgresql.org
Subject: Re: Build from file syntax troublem (part II).
Date: Mon, 07 Mar 2005 09:35:44 -0500
Message-ID: <22994.1110206144@sss.pgh.pa.us> (raw)
In-Reply-To: <936719781.20050307132147@komi.parma.ru>
References: <05030601450100.01195@inta>
<27861.1110065906@sss.pgh.pa.us>
<936719781.20050307132147@komi.parma.ru>
Radtchenko Igor <inta@komi.parma.ru> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, inta@komi.parma.ru
Subject: Re: Build from file syntax troublem (part II).
In-Reply-To: <22994.1110206144@sss.pgh.pa.us>
References: <05030601450100.01195@inta> <27861.1110065906@sss.pgh.pa.us> <936719781.20050307132147@komi.parma.ru> <22994.1110206144@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox