Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Admin > Functions
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 5089 of 5549
Post > Topic >>

Functions

by shreeseva.it@[EMAIL PROTECTED] ("C K") Jun 24, 2008 at 04:13 PM

------=_Part_551_250315.1214304218444
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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 sup****t procedures, rather it uses
Functions. While creating a function from MySQL as

CREATE DEFINER=`root`@[EMAIL PROTECTED]
 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 sup****t 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.

------=_Part_551_250315.1214304218444
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Dear Members,<br>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 sup****t
procedures, rather it uses Functions. While creating a function from MySQL
as<br>
<br>CREATE DEFINER=`root`@[EMAIL PROTECTED]
 PROCEDURE `postdoc`(vardocid
int)<br>&nbsp;&nbsp;&nbsp; MODIFIES SQL DATA<br>UPDATE
docs&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SET posted =
-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE docid =
vardocid;<br><br>on PG, it gave me error for using variable in where
condition. Other things are properly defined thru&#39; PGAdmin. Does PG do
no sup****t 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.<br>
How could I use varibles in the functions?<br>Plesae help and give the
details on above issue.<br clear="all"><br>Thanks<br><br>CPK<br>--
<br>Keep your Environment clean and green.

------=_Part_551_250315.1214304218444--
 




 1 Posts in Topic:
Functions
shreeseva.it@[EMAIL PROTE  2008-06-24 16:13:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 17:11:36 CST 2008.