Skip site navigation (1) Skip section navigation (2)

Re: Anonymous Code Blocks as Lambdas?

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(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 20:59:08
Message-ID: 42A0A796-0576-43C8-9EAA-E2EA4313E3A2@kineticode.com (view raw or flat)
Thread:
Lists: 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

In response to

Responses

pgsql-hackers by date

Next:From: David E. WheelerDate: 2009-10-26 21:00:08
Subject: Re: Anonymous Code Blocks as Lambdas?
Previous:From: Kevin GrittnerDate: 2009-10-26 20:56:28
Subject: Re: table corrupted

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group