Search Postgresql Archives

cursor with dinamic string

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I need use dinamic string for my cursor... My code is:

query varchar := 'field1, field2 from ''' || tableName ||''' ........; //has dinamic params

then I create cursor...

myCursor CURSOR FOR SELECT query;

I compile my function but when i run it I obtain error...

ERROR:  invalid input syntax for integer: ......
CONTEXT:  PL/pgSQL function "my_function" line 72 at FETCH

If I use static string, I don't have problems!!!

Can I solve it?

Thanks in advance

--
Luca Santaniello
email: luca.santaniello.81@xxxxxxxxx
skype: luca.santaniello
msn: luketto81@xxxxxxxxxxx


--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux