Re: Conditional Statement

From: Doug McNaught <doug(at)wireboard(dot)com>
To: Samik Raychaudhuri <samik(at)cae(dot)wisc(dot)edu>
Cc: Medi Montaseri <medi(at)cybershell(dot)com>, pgsql general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Conditional Statement
Date: 2002-03-04 04:33:10
Message-ID: m31yf1ne9l.fsf@varsoon.denali.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Samik Raychaudhuri <samik(at)cae(dot)wisc(dot)edu> writes:

> Hi,
> Thanks a lot for the pointer. But it seems I can't run these commands
> through psql. Specifically, I am trying to run the following file
> through psql, and getting the errors as below. I used to do similar
> stuff in Sybase.

You need to define a PL/pgSQL function that contains your code.
'psql' takes straight SQL code, which does not support IF/THEN/ELSE.

-Doug
--
Let us cross over the river, and rest under the shade of the trees.
--T. J. Jackson, 1863

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas T. Thai 2002-03-04 06:33:10 Re: help with getting index scan
Previous Message Medi Montaseri 2002-03-04 03:27:17 Re: Conditional Statement