Search Postgresql Archives

Re: can I define own variables?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux