From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Anonymous Code Blocks as Lambdas? |
Date: | 2009-10-26 21:12:54 |
Message-ID: | 162867790910261412v6bee0cdcodacabd62abec6fe1@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2009/10/26 David E. Wheeler <david(at)kineticode(dot)com>:
> 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?
is is psql variables.
And why would a `DO` feature be
> tied directly to psql?
>
it should be light relation. 'DO' should be parametrised, and psql can
use own variables as 'DO' parameters.
> Confused,
>
> David
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2009-10-26 21:13:20 | Re: Parsing config files in a directory |
Previous Message | Robert Haas | 2009-10-26 21:11:26 | Re: Parsing config files in a directory |