pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Returning back a resultset from a stored function
7+ messages / 4 participants
[nested] [flat]

* Returning back a resultset from a stored function
@ 2004-08-27 15:04 Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Daniel Daoust @ 2004-08-27 15:04 UTC (permalink / raw)
  To: pgsql-odbc

Hi,

I am looking at ways to return a resultset from a
stored function through ODBC.
My background is in Oracle and I have to implement a
new VB6 system using PostgreSQL.

I have found that "psqlodbc" does not support the
refcursor type.
I also investigated the following form: " select *
from somefunc(); ", but realized that this worked only
inside "PL/pgSQL", therefore could not be used
directly from SQL.

First: Are my assumptions correct?
Second: Does anyone know a way to accomplish what I am
trying to do? 

I would appreciate any thoughts on the subject.

Thank you,
Daniel


______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
@ 2004-08-27 16:06 ` Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 16:23   ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  0 siblings, 1 reply; 7+ messages in thread

From: Peter Eisentraut @ 2004-08-27 16:06 UTC (permalink / raw)
  To: Daniel Daoust <daoustd_ca@yahoo.ca>; pgsql-odbc

Daniel Daoust wrote:
> I have found that "psqlodbc" does not support the
> refcursor type.
> I also investigated the following form: " select *
> from somefunc(); ", but realized that this worked only
> inside "PL/pgSQL", therefore could not be used
> directly from SQL.

"select * from somefunc();" is certainly SQL, so what is the problem?

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
@ 2004-08-27 16:23   ` Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:28     ` Re: Returning back a resultset from a stored function Joe Conway <mail@joeconway.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Daniel Daoust @ 2004-08-27 16:23 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; pgsql-odbc

> 
> "select * from somefunc();" is certainly SQL, so
> what is the problem?
> 

Then, could you help me understand why I am getting
the following message 'ERROR:  parser: parse error at
or near "(" ' when I run the select from 'psql'.

Thanks,
Daniel

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 16:23   ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
@ 2004-08-27 16:28     ` Joe Conway <mail@joeconway.com>
  2004-08-27 16:40       ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  0 siblings, 1 reply; 7+ messages in thread

From: Joe Conway @ 2004-08-27 16:28 UTC (permalink / raw)
  To: Daniel Daoust <daoustd_ca@yahoo.ca>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-odbc

Daniel Daoust wrote:
>>"select * from somefunc();" is certainly SQL, so
>>what is the problem?
> 
> Then, could you help me understand why I am getting
> the following message 'ERROR:  parser: parse error at
> or near "(" ' when I run the select from 'psql'.

What version of Postgres? If it is prior to 7.3, table functions are not 
supported.

Joe



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 16:23   ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:28     ` Re: Returning back a resultset from a stored function Joe Conway <mail@joeconway.com>
@ 2004-08-27 16:40       ` Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 18:44         ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 7+ messages in thread

From: Daniel Daoust @ 2004-08-27 16:40 UTC (permalink / raw)
  To: Joe Conway <mail@joeconway.com>; +Cc: Peter Eisentraut <peter_e@gmx.net>; pgsql-odbc

Sorry, I should have included that information in the
beginning. We are using 7.2.1, however we will update
to 7.4 in the coming days.

What about postgreSQL 8.0, should we consider it or
wait until it is stable. We will be in development
mode for some time and won't be using any of the new
features for a little while.

Thanks again,
Daniel

______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 16:23   ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:28     ` Re: Returning back a resultset from a stored function Joe Conway <mail@joeconway.com>
  2004-08-27 16:40       ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
@ 2004-08-27 18:44         ` Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 18:51           ` Re: Returning back a resultset from a stored function Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 7+ messages in thread

From: Peter Eisentraut @ 2004-08-27 18:44 UTC (permalink / raw)
  To: Daniel Daoust <daoustd_ca@yahoo.ca>; Joe Conway <mail@joeconway.com>; +Cc: pgsql-odbc

Daniel Daoust wrote:
> What about postgreSQL 8.0, should we consider it or
> wait until it is stable. We will be in development
> mode for some time and won't be using any of the new
> features for a little while.

It's probably a bit too early to think about 8.0.  I wouldn't expect a 
release until November.

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: Returning back a resultset from a stored function
  2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:06 ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
  2004-08-27 16:23   ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 16:28     ` Re: Returning back a resultset from a stored function Joe Conway <mail@joeconway.com>
  2004-08-27 16:40       ` Re: Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
  2004-08-27 18:44         ` Re: Returning back a resultset from a stored function Peter Eisentraut <peter_e@gmx.net>
@ 2004-08-27 18:51           ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2004-08-27 18:51 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: Daniel Daoust <daoustd_ca@yahoo.ca>; Joe Conway <mail@joeconway.com>; pgsql-odbc

Peter Eisentraut <peter_e@gmx.net> writes:
> Daniel Daoust wrote:
>> What about postgreSQL 8.0, should we consider it or
>> wait until it is stable. We will be in development
>> mode for some time and won't be using any of the new
>> features for a little while.

> It's probably a bit too early to think about 8.0.  I wouldn't expect a 
> release until November.

However, if they plan to be in development mode through, say, the end of
the year, then 8.0 would be a good option.  I think it is plenty stable
enough for development work.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2004-08-27 18:51 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-27 15:04 Returning back a resultset from a stored function Daniel Daoust <daoustd_ca@yahoo.ca>
2004-08-27 16:06 ` Peter Eisentraut <peter_e@gmx.net>
2004-08-27 16:23   ` Daniel Daoust <daoustd_ca@yahoo.ca>
2004-08-27 16:28     ` Joe Conway <mail@joeconway.com>
2004-08-27 16:40       ` Daniel Daoust <daoustd_ca@yahoo.ca>
2004-08-27 18:44         ` Peter Eisentraut <peter_e@gmx.net>
2004-08-27 18:51           ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox