Discussion:
Global variables in plpgsql
Nick Raj
2011-04-11 11:33:52 UTC
Permalink
Hi,
Can anyone know how to define global variable in plpgsql?
Thanks

Regards,
Raj
Christopher Browne
2011-04-11 18:46:22 UTC
Permalink
Post by Nick Raj
Can anyone know how to define global variable in plpgsql?
I expect you should consult the manual page on the command CREATE
TABLE. That's what would be the nearest SQL equivalent to a "global
variable."

http://www.postgresql.org/docs/9.0/static/sql-createtable.html
--
http://linuxfinances.info/info/postgresql.html
--
Sent via pgsql-hackers mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Pavel Stehule
2011-04-11 19:34:55 UTC
Permalink
Hello
Post by Nick Raj
Hi,
Can anyone know how to define global variable in plpgsql?
Thanks
Regards,
Raj
plpgsql doesn't support global or session variables.

There are a few techniques - you can emulate it


http://www.postgresql.org/docs/8.3/static/plperl-global.html

Regards

Pavel Stehule
--
Sent via pgsql-hackers mailing list (pgsql-***@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Loading...