Functions

From: "C K" <shreeseva(dot)it(at)gmail(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Functions
Date: 2008-06-24 10:43:38
Message-ID: d3561eb00806240343i772d1043jdd320cc629898901@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Dear Members,
I am switching our ERP and other under development applications from MySQL
to PostgreSQL. While working on this, I got some problems while creating
store procedures. As PG does not support procedures, rather it uses
Functions. While creating a function from MySQL as

CREATE DEFINER=`root`(at)`localhost` PROCEDURE `postdoc`(vardocid int)
MODIFIES SQL DATA
UPDATE docs SET posted = -1 WHERE docid = vardocid;

on PG, it gave me error for using variable in where condition. Other things
are properly defined thru' PGAdmin. Does PG do no support to use variables
or variable names in the functions? As per manual for 8.3, I understood to
use $1, $2...$n for the input parameter reference, but it is difficult to
mark them correclty in a big function having many parameters.
How could I use varibles in the functions?
Plesae help and give the details on above issue.

Thanks

CPK
--
Keep your Environment clean and green.

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2008-06-24 14:56:10 Re: plpgsql function seems to be leaking memory
Previous Message Marc Cousin 2008-06-24 08:56:29 plpgsql function seems to be leaking memory