Re: can I define own variables?

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Guy Rouillier" <guyr-ml1(at)burntmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: can I define own variables?
Date: 2007-10-16 07:44:27
Message-ID: 162867790710160044v1e514ab5ye3b0a80bdc05efd4@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> > http://www.postgresql.org/docs/8.2/static/functions-admin.html#FUNCTIONS-ADMIN-SET-TABLE
> >
>
> Thank you, Tom. Since "select current_setting('uservars.user_name')"
> and "SHOW uservars.user_name" are both PostgreSQL extensions, why not
> allow them to be used interchangeably? In short, why isn't the
> following legal in a PL/pgsql procedure:
>
> NEW.user_name := (SHOW uservars.user_name);
>

It's little bit strange. It has not dificult implementation, but It's redundand.

what is more readable and more simple?

a) var := (SHOW system_var);
b) var := (SELECT current_setting('system_var'));

c) var := current_setting('system_var');

I thing so c).

Pavel

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dave Page 2007-10-16 08:56:45 Re: pgadmin's pgagent job scheduler
Previous Message Ow Mun Heng 2007-10-16 07:32:11 pgadmin's pgagent job scheduler