Re: plpgsql vs. SQL in stored procedures

From: Christopher Browne <cbbrowne(at)acm(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: plpgsql vs. SQL in stored procedures
Date: 2004-03-31 08:31:01
Message-ID: m3r7v9zad6.fsf@wolfe.cbbrowne.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

mail(at)webthatworks(dot)it (Ivan Sergio Borgonovo) wrote:
> Is there a way to declare variables and use IF in plain SQL, not in
> plpgsql inside stored procedures?

The forthcoming support for recursive queries using a WITH clause
might provide, after a fashion, a way to declare variables.

As for IF, there is a functional equivalent to it in the form of the
SQL standard CASE statement.
--
select 'cbbrowne' || '@' || 'ntlug.org';
http://www.ntlug.org/~cbbrowne/linuxxian.html
"How should I know if it works? That's what beta testers are for. I
only coded it." (Attributed to Linus Torvalds, somewhere in a
posting)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephen Quinney 2004-03-31 10:41:27 Timestamp manipulation
Previous Message Josh Berkus 2004-03-31 06:14:46 Re: [SQL] SQL Spec Compliance Questions