Re: PL/SQL & unset custom variable

From: Gordon Ross <gr306(at)ucs(dot)cam(dot)ac(dot)uk>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/SQL & unset custom variable
Date: 2009-09-02 19:31:16
Message-ID: 0AF872F3E2A0384696B55097A811D40A17F72FE53A@gargantua.staff-ad.csi.cam.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hmmm.

If I do:

select * from pg_settings where name='custom_variable_classes';

I see my entry "phone", but I can't see how I can tell if I've set "phone.id"

GTG
________________________________________
From: Tom Lane [tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 02 September 2009 19:16
To: Gordon Ross
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] PL/SQL & unset custom variable

Gordon Ross <gr306(at)ucs(dot)cam(dot)ac(dot)uk> writes:
> Sorry, no joy :-(

> grails=> SELECT current_setting('phone.id');
> ERROR: unrecognized configuration parameter "phone.id"

> grails=> SELECT coalesce(current_setting('phone.id'),'SYSTEM');
> ERROR: unrecognized configuration parameter "phone.id"

You could use a SELECT from pg_settings to probe for the value
of the parameter without getting an error.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Huber 2009-09-02 19:50:44 binary format of array stored as text
Previous Message V S P 2009-09-02 19:03:37 Re: [Q] optmizing postgres for 'single client' / many small queries