Re: pl/pgsql or control structures outside of a function?

From: John DeSoi <desoi(at)pgedit(dot)com>
To: Peter Koczan <pjkoczan(at)gmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: pl/pgsql or control structures outside of a function?
Date: 2009-04-04 04:28:40
Message-ID: 29505E7D-05C7-4F8A-91AD-C5596FA51987@pgedit.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Apr 3, 2009, at 5:03 PM, Peter Koczan wrote:

> Is there any way to use PL/pgSQL code outside of a function?

No.

>
>
> The reason I'm asking is that I'm porting some code from
> sybase/isql/SQR, and it allows some control code structures to be used
> in an sql script. For instance,

CASE might work for you.

http://www.postgresql.org/docs/8.3/interactive/functions-conditional.html

John DeSoi, Ph.D.

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Greg Sabino Mullane 2009-04-06 02:21:59 Re: How would I get rid of trailing blank line?
Previous Message Peter Koczan 2009-04-03 21:03:26 pl/pgsql or control structures outside of a function?