Re: Conditional Statement - Mailing list pgsql-general

From Doug McNaught
Subject Re: Conditional Statement
Date
Msg-id m31yf1ne9l.fsf@varsoon.denali.to
Whole thread Raw
In response to Conditional Statement  (Samik Raychauhduri <samik@cae.wisc.edu>)
List pgsql-general
Samik Raychaudhuri <samik@cae.wisc.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

pgsql-general by date:

Previous
From: Samik Raychaudhuri
Date:
Subject: Re: Conditional Statement
Next
From: "Thomas T. Thai"
Date:
Subject: Re: help with getting index scan