[SQL] calling function , passing OLD as argument

2004-07-14 Thread R.Welz
Hello. I am a beginner with pgsql and struggeling with the documentation. With the help from the folks on the PSQL Novice List I managed to work out that declaring CREATE OR REPLACE FUNCTION deny_namen_telefonverweise(namen_telefonverweise) RETURNS void AS ' DECLARE ... would work where the fu

Re: [SQL] calling function

2004-03-03 Thread Tom Lane
"William Anthony Lim" <[EMAIL PROTECTED]> writes: > create or replace function testcall(int4,varchar,bool,int2) return setof record as ' > ... > select * from testcall(12,'ABCD',true,2); > ERROR: function testcall(integer, "unknown", boolean, integer) does not exist An undecorated integer con

[SQL] calling function

2004-03-03 Thread William Anthony Lim
Hi, I have a little trouble. I'm newbie in postgresql. Consider this function example: create or replace function testcall(int4,varchar,bool,int2) return setof record as ' declare r record; a int4; b varchar; c bool; d int2; begin a=$1; b=$2

Re: [SQL] calling function from rule

2003-01-24 Thread Tambet Matiisen
> -Original Message- > From: Tom Lane [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 7:01 PM > To: Tambet Matiisen > Cc: [EMAIL PROTECTED] > Subject: Re: [SQL] calling function from rule > > > "Tambet Matiisen" <[EMAIL PROTECTE

Re: [SQL] calling function from rule

2003-01-23 Thread Tom Lane
"Tambet Matiisen" <[EMAIL PROTECTED]> writes: >> Try 7.3, we changed the rules about returned records count. > I have 7.3. When rule and action are the same, everything works fine. > Doing an insert in update rule and opposite are OK too. Problem is, > when I do select in insert/update/delete rule

Re: [SQL] calling function from rule

2003-01-23 Thread Tambet Matiisen
> > "Tambet Matiisen" <[EMAIL PROTECTED]> writes: > > I have a view and update rule on it, which updates another > table. Now I would like to call a function, after update of > the table is done. Also the function must be called in the > same transaction as update. I tried to define an additio

Re: [SQL] calling function from rule

2003-01-23 Thread Tom Lane
"Tambet Matiisen" <[EMAIL PROTECTED]> writes: > I have a view and update rule on it, which updates another table. Now I would like >to call a function, after update of the table is done. Also the function must be >called in the same transaction as update. I tried to define an additional update ru

[SQL] calling function from rule

2003-01-23 Thread Tambet Matiisen
I have a view and update rule on it, which updates another table. Now I would like to call a function, after update of the table is done. Also the function must be called in the same transaction as update. I tried to define an additional update rule on the view, but doing a SELECT in update rul