Re: how to use variables in postgresql - Mailing list pgsql-novice

From A. Kretschmer
Subject Re: how to use variables in postgresql
Date
Msg-id 20070622060732.GA31813@a-kretschmer.de
Whole thread Raw
In response to how to use variables in postgresql  ("saumya goel" <somya.goel@gmail.com>)
Responses Re: how to use variables in postgresql  (Christoph Della Valle <christoph.dellavalle@goetheanum.ch>)
List pgsql-novice
am  Thu, dem 21.06.2007, um 22:55:38 -0700 mailte saumya goel folgendes:
> I HAVE A PROBLEM REGARDING DECLARATION/ INITIALISATION OF VARIABLES IN
> POSTGRESQL FUNCTIONS AND PROCEDURES. MY CODE PRESENTLY LOOKS LIKE
> CREATE FUNCTION ins_into_std_values() RETURNS void AS
> $BODY$
> myflag CHAR(1) :='y';
> ...
> $BODY$
> LANGUAGE 'sql' VOLATILE;

Use another language, for instance plpgsql. Pure SQL hasn't variables.
http://www.postgresql.org/docs/current/interactive/plpgsql.html


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

pgsql-novice by date:

Previous
From: "saumya goel"
Date:
Subject: how to use variables in postgresql
Next
From: Christoph Della Valle
Date:
Subject: Re: how to use variables in postgresql