Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9HFioP53146 for ; Wed, 17 Oct 2001 11:44:50 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 149639; Wed, 17 Oct 2001 08:44:44 -0700 From: "Josh Berkus" Subject: Re: Variables. To: "Aasmund Midttun Godal" , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Wed, 17 Oct 2001 08:44:44 -0700 Message-ID: In-Reply-To: <20011017010054.28016.qmail@ns.krot.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===149639====davinci.ethosmedia.com===_" X-Archive-Number: 200110/240 X-Sequence-Number: 5195 This is a multi-part MIME message --_===149639====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit 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 --_===149639====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===149639====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===149639====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===149639====davinci.ethosmedia.com===_--