From: Josh Berkus <josh@agliodbs.com>
To: Christian Rishoej <chrris@mail.dk>
To: pgsql-sql@postgresql.org
Subject: Re: Rules and variables?
Date: Fri, 17 May 2002 16:53:33 -0700
Message-ID: <200205171653.33416.josh@agliodbs.com> (raw)
In-Reply-To: <1021678745.15813.42.camel@penelope.dyndns.dk>
References: <1021678745.15813.42.camel@penelope.dyndns.dk>
Christian,
> I need to hold an integer value and use it in some queries in a rule I
> have. I tried to use a temporary table, but without luck (got an error
> like Relation "tmpfoo" does not exist ).
>
> My question is: How can I hold this value thoughout the rule? Can I use
> variables of some sort?
Have the rule execute a PL/pgSQL function. PL/pgSQL has full variable
support; see the documentation under "procedural functions".
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, chrris@mail.dk
Subject: Re: Rules and variables?
In-Reply-To: <200205171653.33416.josh@agliodbs.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox