| From: | Alban Hertroys <alban(at)magproductions(dot)nl> | 
|---|---|
| To: | Ashish Karalkar <ashish_karalkar(at)yahoo(dot)com> | 
| Cc: | slony <pgsql-general(at)postgresql(dot)org> | 
| Subject: | Re: error in open cursor | 
| Date: | 2007-01-12 13:54:18 | 
| Message-ID: | 45A7930A.40603@magproductions.nl | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Ashish Karalkar wrote:
> Hello all,
> I am getting a syntax error near open cursor,
> can anybody please point me what is missing. i am
> using Postgresql 8.2
> 
> CREATE OR REPLACE FUNCTION
> sp_gen_foreign_keys_tables(OUT par_result integer, OUT
> par_childtables text, IN par_colname character varying
> , IN par_colvalue integer) AS
> $BODY$
> 
>  DECLARE
>          tablename varchar(300);
> 	 columnname varchar(300);
> 	countno integer;
> 	curfroeign cursor (columnname varchar(300)) is select
> distinct(fk_relation),fk_column from foreign_keys
> where pk_relation in (select pk_relation from
> foreign_keys where pk_column=columnname);
>         var_str1  varchar(300);
>       
> BEGIN
> 
> 	
> 	open curforeign(par_colname);
Postgres doesn't know what curforeign is, it does however know what
curfroeign is ;)
-- 
Alban Hertroys
alban(at)magproductions(dot)nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
   7500 AK Enschede
// Integrate Your World //
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2007-01-12 13:55:52 | Re: Corrupt database? 8.1/FreeBSD6.0 | 
| Previous Message | Alvaro Herrera | 2007-01-12 13:49:04 | Re: WAL question |