Search Postgresql Archives

Re: transaction problem using cursors

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

 




I didn't try myself, but wrapping the whole into a PL/pgSQL function and
using exceptions might do the work;



It's not good advice. I tested it, and problem is in where clause. I
don't understand problem well, but one possibility is change from cast
to to_number function like:

postgres=# begin;
BEGIN
postgres=# declare c cursor for select * from fx where to_number(b,'99999') > 0;
DECLARE CURSOR
postgres=# fetch from c;
a  | b
----+----
10 | 20
(1 row)

postgres=# fetch from c;
a  |  b
----+-----
10 | a20
(1 row)

But still this solution is +/- correct

Regards
Pavel


[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