Skip site navigation (1) Skip section navigation (2)

Re: ODBC driver and refcursors

From: Farooq <shorrt_circuit(at)yahoo(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: ODBC driver and refcursors
Date: 2009-06-01 11:15:08
Message-ID: 620986.88629.qm@web45108.mail.sp1.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Any ideas? Anyone?

--- On Thu, 5/28/09, Farooq <shorrt_circuit(at)yahoo(dot)com> wrote:

> From: Farooq <shorrt_circuit(at)yahoo(dot)com>
> Subject: ODBC driver and refcursors
> To: pgsql-odbc(at)postgresql(dot)org
> Date: Thursday, May 28, 2009, 10:25 AM
> Hi Everyone,
> 
> I've been using 8.1 server and odbc driver with my
> application on windows and it has been working fine. I
> upgraded to 8.3.4 and started seeing issues with some of
> my
> queries.
> 
> Here is the scenario:
> 
> create table users (userid int, username varchar(10));
> 
> insert into users values (1,'user1');
> insert into users values (2,'user2');
> insert into users values (3,'user3');
> insert into users values (4,'user4');
> insert into users values (5,'user5');
> 
> -- And I have functions similar to this
> 
> create or replace function test_cursor( refcursor, uid
> int)
> returns refcursor as
> $$
> BEGIN
>       open $1 for
> 
> select userid, username
> from  users
> where userid >uid;
> 
>       return $1;
> END;
> $$
> LANGUAGE 'plpgsql';
> 
> -- My application sends this query
> 
> select * from test_cursor('curs',3);
> fetch all in "curs";
> 
> With 8.1 odbc driver, I get the below rows:
> 
> userid  |  username
> --------------------
> 4    |  user4
> 5    |  user5
> 
> And with 8.3 odbc driver, I get
> 
> test_cursor
> ---------------
> curs
> 
> 
> The database server is the same with both drivers; what has
> changed
> in the new odbc driver? Do I need to configure something
> while creating the DSN?
> 
> Thanks for your help!
> 
> Regards,
> Farooq
> 
> 
> 
>       
> 


      


Responses

pgsql-odbc by date

Next:From: Craig RingerDate: 2009-06-01 12:49:08
Subject: Re: ODBC driver and refcursors
Previous:From: Pragadheeswaran GopalakrishnanDate: 2009-05-30 08:44:14
Subject: Pragadheeswaran Gopalakrishnan sent you a Friend Request on Yaari

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group