Re: how to use variables in postgresql

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to use variables in postgresql
Date: 2007-06-22 06:07:32
Message-ID: 20070622060732.GA31813@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Christoph Della Valle 2007-06-22 06:35:39 Re: how to use variables in postgresql
Previous Message saumya goel 2007-06-22 05:55:38 how to use variables in postgresql