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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Build from file syntax troublem (part II).
Дата
Msg-id 22994.1110206144@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Build from file syntax troublem (part II).  (Radtchenko Igor <inta@komi.parma.ru>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] Postgres schema comparison.
Следующее
От: Stef
Дата:
Сообщение: Re: Postgres schema comparison.