Re: Build from file syntax troublem (part II).

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Radtchenko Igor <inta(at)komi(dot)parma(dot)ru>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Build from file syntax troublem (part II).
Date: 2005-03-07 14:35:44
Message-ID: 22994.1110206144@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Radtchenko Igor <inta(at)komi(dot)parma(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Stef 2005-03-07 15:09:14 Re: Postgres schema comparison.
Previous Message Tom Lane 2005-03-07 14:30:53 Re: [SQL] Postgres schema comparison.