pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christopher Browne <cbbrowne@acm.org>
To: pgsql-sql@postgresql.org
Subject: Re: plpgsql vs. SQL in stored procedures
Date: Wed, 31 Mar 2004 03:31:01 -0500
Message-ID: <m3r7v9zad6.fsf@wolfe.cbbrowne.com> (raw)
References: <20040331000808.7aaedc33@stige.webthatworks.it>

mail@webthatworks.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)



view thread (4+ messages)  latest in thread

Message-ID: <m3r7v9zad6.fsf@wolfe.cbbrowne.com>
Permalink:  ../m3r7v9zad6.fsf@wolfe.cbbrowne.com/
Also on:    postgresql.org/message-id/m3r7v9zad6.fsf@wolfe.cbbrowne.com

 · 

reply

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: cbbrowne@acm.org
  Subject: Re: plpgsql vs. SQL in stored procedures
  In-Reply-To: <m3r7v9zad6.fsf@wolfe.cbbrowne.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