Re: Anonymous Code Blocks as Lambdas?

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Anonymous Code Blocks as Lambdas?
Дата
Msg-id 42A0A796-0576-43C8-9EAA-E2EA4313E3A2@kineticode.com
обсуждение исходный текст
Ответ на Re: Anonymous Code Blocks as Lambdas?  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: Anonymous Code Blocks as Lambdas?
Список pgsql-hackers
On Oct 26, 2009, at 1:16 PM, Pavel Stehule wrote:

> I have a idea about migration of outer (psql) variables, and custom
> shell variables.
>
> some like:
>
> psql --allow_custom_variables --table_name=mytable
>
> inside psql we should to use :table_name variable with  "mytable" as  
> content.
>
> then we can use syntax
>
> do (table_name varchar) $$
> begin
>  raise notice 'TABLENAME IS %', table_name;
>  return;
> end;
> $$
>
> so with this mechanism we can to simply parametrise plpgsql "do"
> scripts from outer environment.

How is this different from psql :variables? And why would a `DO`  
feature be tied directly to psql?

Confused,

David


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: table corrupted
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: Anonymous Code Blocks as Lambdas?