From: Josh Berkus <josh@agliodbs.com>
To: Aasmund Midttun Godal <postgresql@envisity.com>
To: pgsql-sql@postgresql.org
Subject: Re: Variables.
Date: Wed, 17 Oct 2001 08:44:44 -0700
Message-ID: <web-149639@davinci.ethosmedia.com> (raw)
In-Reply-To: <20011017010054.28016.qmail@ns.krot.org>
Aasmund,
> I do not know whether it is part of the SQL standard.
>
> Variables...
Nope.
> CREATE VARIABLE foobar INTEGER DEFAULT 1 NOT NULL;
>
> SELECT * FROM thebar WHERE id = foobar;
>
> CREATE TEMPORARY VARIABLE...
> CREATE CONSTANT....
Extensive support for a variety of variable types and constructions is
available in FUNCTIONS. PL/pgSQL, PL/TCL, PL/Perl ... take your pick.
For the raw command-line SQL, variables, constants, and other procedural
language elements are not appropriate. This is best done in procedures,
functions, and middleware.
Of course, it is an Open-Source project, so if you hire your own
programmer, you can do anything you want.
-Josh Berkus
______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco
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, postgresql@envisity.com
Subject: Re: Variables.
In-Reply-To: <web-149639@davinci.ethosmedia.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