[SQL] CREATE FUNCTION- Table as argument

2000-06-05 Thread p . lam
I am running PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66. I have currently a table like the following: TABA: a|start|finish -+-+-- R|4| 8 S|6|10 I want the output a table with start incremented by 1, and fininsh as the maximum of fininish in all r

[SQL] Simulating CURSORS??

2000-06-01 Thread p . lam
I read from messages like http://www.postgresql.org/mhonarc/pgsql-sql/1999-11/msg00076.html that CURSORS could not be used with pg/plsql, and indeed attempting to do so result in the same kind of error highlighted in that message. Are there any other ways I could with pgplsql simuate the use of

[SQL] Pg/PLSQL Errors!!

2000-05-30 Thread p . lam
I am running PostgreSQL 6.5.3 on RedHat Linux 6.1 on a PC. I am trying to use Pg/PLSQL. I even tried being conservative enough to copy the example code from http://www.postgresql.org/docs/user/c40874340.htm as follows: CREATE FUNCTION add_one (int4) RETURNS int4 AS ' BEGIN RETURN $1 +