FAQ
Is it possible, via standard PostgreSQL or an extension, to set up a user-defined global variable outside of a stored procedure, and be able to query against the value of that variable?

Search Discussions

  • Michael Fuhr at Jul 7, 2005 at 4:33 am

    On Wed, Jul 06, 2005 at 03:16:56PM -0400, Van Ingen, Lane wrote:
    Is it possible, via standard PostgreSQL or an extension, to set
    up a user-defined global variable outside of a stored procedure,
    and be able to query against the value of that variable?
    Some people use temporary tables for storing such values. Another
    way would be to write set/get functions in a language that supports
    global storage (PL/Perl, PL/Tcl, PL/Python, etc.). See for example
    the set_var() and get_var() functions in the PL/Perl documentation:

    http://www.postgresql.org/docs/8.0/static/plperl-global.html
  • Andreas Kretschmer at Jul 7, 2005 at 5:06 am

    am 06.07.2005, um 15:16:56 -0400 mailte Van Ingen, Lane folgendes:
    Is it possible, via standard PostgreSQL or an extension, to set up a
    user-defined global variable outside of a stored procedure, and be
    able to query against the value of that variable?
    You can use languages like plperl to store persistent data, a nice
    example is there: http://www.varlena.com/varlena/GeneralBits/ ( Show
    Previous Row Values in plperl)



    Regards, Andreas
    --
    Andreas Kretschmer (Kontakt: siehe Header)
    Heynitz: 035242/47212, D1: 0160/7141639
    GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net
    === Schollglas Unternehmensgruppe ===

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppgsql-novice @
categoriespostgresql
postedJul 6, '05 at 7:17p
activeJul 7, '05 at 5:06a
posts3
users3
websitepostgresql.org
irc#postgresql

People

Translate

site design / logo © 2022 Grokbase