| From: | Baris Ulu <ulu(at)bornova(dot)ege(dot)edu(dot)tr> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | Declare Cursor... |
| Date: | 1999-11-08 14:32:22 |
| Message-ID: | Pine.OSF.4.00.9911081725380.29768-100000@bornova.ege.edu.tr |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I am trying to declare a cursor inside a plpgsql function in a
begin end block as in the following:
create function func_1(char, float8, int4, int4) returns int4 as '
declare
x alias for $1;
y alias for $2;
z alias for $3;
t alias for $4;
...
begin work;
declare cursor_x cursor for select a, b, c, d from table_1 where a = x;
...
end work;
when this function is compiled, it gives me the following error:
NOTICE: plpgsql: ERROR during compile of func_1 near line ...
ERROR: parse error at or near "CURSOR"
If anyone can help me about my problem, I will be very happy...THANKS!
Baris ULU
Computer Engineer
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oskar Liljeblad | 1999-11-08 17:19:46 | about the subselect query |
| Previous Message | Oliver Fischer | 1999-11-08 13:27:47 | Creating a index with a timestamp? |