Re: order of statements in create function

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: order of statements in create function
Дата
Msg-id 20040709182405.GC25393@dcc.uchile.cl
обсуждение исходный текст
Ответ на order of statements in create function  (Markus Bertheau <twanger@bluetwanger.de>)
Ответы Re: order of statements in create function  (Markus Bertheau <twanger@bluetwanger.de>)
Список pgsql-general
On Fri, Jul 09, 2004 at 07:16:14PM +0200, Markus Bertheau wrote:

> why does everyone write
>
> CREATE FUNCTION foo() RETURNS INTEGER AS '
> blah blah
> ' LANGUAGE 'plpgsql';
>
> I've never seen for example:
>
> CREATE FUNCTION foo()
>     RETURNS INTEGER
>     LANGUAGE 'plpgsql'
>     AS '
> blah blah
> ';
>
> Is there a special reason to this? I have a hard time believing that
> everyone does it the same way by coincidence.

I think previous versions only allowed the language specification at the
end.  I got used to putting it before the function text though, so if
you are able to read something written by me you'd see that.

That was your point, wasn't it?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"In fact, the basic problem with Perl 5's subroutines is that they're not
crufty enough, so the cruft leaks out into user-defined code instead, by
the Conservation of Cruft Principle."  (Larry Wall, Apocalypse 6)


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

Предыдущее
От: "culley harrelson"
Дата:
Сообщение: will this bug be fixed in 7.5
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: order of statements in create function