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

Re: proposal - assign result of query to psql variable

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Shigeru Hanada <shigeru(dot)hanada(at)gmail(dot)com>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Phil Sorber <phil(at)omniti(dot)com>, Erik Rijkers <er(at)xs4all(dot)nl>, David Fetter <david(at)fetter(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: proposal - assign result of query to psql variable
Date: 2013-02-01 05:22:59
Message-ID: CAFj8pRA_f_wg0dhTaVO8rGdbeJN+XarW9rSCDjk1KGrUDSgg+Q@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello

can you look, please, on updated version - it respects Tom's proposal
and it is significantly reduced?

Thank you

Pavel Stehule

2013/1/28 Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>:
> Hello
>
> 2013/1/26 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
>> Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
>>> +1. This looks quite nifty. Maybe useful too to have a default prefix
>>> via some setting.
>>
>> Meh.  I would expect that "\gset :foo" would work to specify a computed
>> prefix if you wanted it --- isn't that sufficient indirection?  I'm not
>> thrilled with further expanding the set of magic variables in psql.
>>
>
> here is patch related to your proposal
>
> Regards
>
> Pavel
>
>>                         regards, tom lane


In response to

pgsql-hackers by date

Next:From: Pavel StehuleDate: 2013-02-01 05:37:39
Subject: Re: Re: proposal: a width specification for s specifier (format function), fix behave when positional and ordered placeholders are used
Previous:From: Amit KapilaDate: 2013-02-01 05:04:33
Subject: Re: Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

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