pg.ddx.io pgsql-admin@postgresql.org mailing list archivehelp / color / mirror / Atom feed
Re: Build from file syntax troublem (part II). 2+ messages / 2 participants [nested] [flat]
* Re: Build from file syntax troublem (part II). @ 2005-03-07 10:21 Radtchenko Igor <inta@komi.parma.ru> 2005-03-07 14:35 ` Re: Build from file syntax troublem (part II). Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 1 reply; 2+ messages in thread From: Radtchenko Igor @ 2005-03-07 10:21 UTC (permalink / raw) To: pgsql-admin Hello Tom, Thank you very much for such fast reply. But now, after I've installed 8.0.1, it says things as examples in little attach. <------ Where I have to dig?.. :( Sunday, March 06, 2005, 2:38:26 AM, you wrote: TL> Igor Radtchenko <inta@komi.parma.ru> writes: >> CREATE FUNCTION public.from_days(int4) RETURNS timestamp AS ' >> select ''0000-01-02''::timestamp + ($1 || '' days'')::interval as result >> ' LANGUAGE 'sql' VOLATILE; >> The parser abuse that >> 'parse error at or near '"." ', >> 'parse error at or near "public'" ', >> 'parse error at or near "#'" '. >> PostgeSQL version is 7.2.3. TL> You need 7.3 or later to deal with schema-aware commands. TL> regards, tom lane -- Best regards, Radtchenko mailto:inta@komi.parma.ru Attachments: nibs.errs (application/octet-stream, 3.4K) download ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Build from file syntax troublem (part II). 2005-03-07 10:21 Re: Build from file syntax troublem (part II). Radtchenko Igor <inta@komi.parma.ru> @ 2005-03-07 14:35 ` Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2005-03-07 14:35 UTC (permalink / raw) To: Radtchenko Igor <inta@komi.parma.ru>; +Cc: pgsql-admin 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 ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-03-07 14:35 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2005-03-07 10:21 Re: Build from file syntax troublem (part II). Radtchenko Igor <inta@komi.parma.ru> 2005-03-07 14:35 ` Tom Lane <tgl@sss.pgh.pa.us>
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