pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
EXECUTE status (was Re: [ODBC] About server side prepare)
9+ messages / 5 participants
[nested] [flat]

* EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 14:36  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 9+ messages in thread

From: Tom Lane @ 2002-12-20 14:36 UTC (permalink / raw)
  To: Hiroshi Inoue <Inoue@tpf.co.jp>; +Cc: pgsql-hackers@postgreSQL.org; pgsql-odbc

Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> Good catch. Hmm this may be a serious problem because
> there's no way to know the row count when we use EXECUTE
> statements.

I wonder if EXECUTE could/should be made to return the appropriate
command status string for the executed statement, instead of "EXECUTE".

			regards, tom lane



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 17:46  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2002-12-20 17:46 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

Tom Lane wrote:
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Good catch. Hmm this may be a serious problem because
> > there's no way to know the row count when we use EXECUTE
> > statements.
> 
> I wonder if EXECUTE could/should be made to return the appropriate
> command status string for the executed statement, instead of "EXECUTE".

I think it should return "EXECUTE" with the counts from the commands. 
Does that make sense?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 17:56  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 2 replies; 9+ messages in thread

From: Tom Lane @ 2002-12-20 17:56 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I think it should return "EXECUTE" with the counts from the commands. 
> Does that make sense?

No.  It would break client libraries, which only expect command tags
INSERT, UPDATE, DELETE to be followed by counts.  Also, INSERT has two
numbers associated with it, the others only one; if we allow both those
cases for EXECUTE then life gets even worse for the client library.

			regards, tom lane



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 17:59  Bruce Momjian <pgman@candle.pha.pa.us>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 9+ messages in thread

From: Bruce Momjian @ 2002-12-20 17:59 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I think it should return "EXECUTE" with the counts from the commands. 
> > Does that make sense?
> 
> No.  It would break client libraries, which only expect command tags
> INSERT, UPDATE, DELETE to be followed by counts.  Also, INSERT has two
> numbers associated with it, the others only one; if we allow both those
> cases for EXECUTE then life gets even worse for the client library.

It is easy to determine what tag to return?  Remember the discussion on
rules and that only the original tag should be returned.  Is there
always one obvious tag to an execute?

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 18:02  Jeroen T. Vermeulen <jtv@xs4all.nl>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 9+ messages in thread

From: Jeroen T. Vermeulen @ 2002-12-20 18:02 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

On Fri, Dec 20, 2002 at 12:56:55PM -0500, Tom Lane wrote:
> 
> No.  It would break client libraries, which only expect command tags
> INSERT, UPDATE, DELETE to be followed by counts.

And MOVE, right?


Jeroen




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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 18:02  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 0 replies; 9+ messages in thread

From: Tom Lane @ 2002-12-20 18:02 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> It is easy to determine what tag to return?  Remember the discussion on
> rules and that only the original tag should be returned.  Is there
> always one obvious tag to an execute?

I would think we'd do it via the rule that we return the same thing
you'd get if you directly issued the query that appears as the body
of the PREPARE command.  All the special cases for rules and so on
seem to apply the same way if you do that.

			regards, tom lane



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-20 18:05  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Jeroen T. Vermeulen <jtv@xs4all.nl>
  0 siblings, 0 replies; 9+ messages in thread

From: Tom Lane @ 2002-12-20 18:05 UTC (permalink / raw)
  To: Jeroen T. Vermeulen <jtv@xs4all.nl>; +Cc: Bruce Momjian <pgman@candle.pha.pa.us>; Hiroshi Inoue <Inoue@tpf.co.jp>; pgsql-hackers@postgresql.org; pgsql-odbc

"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes:
> On Fri, Dec 20, 2002 at 12:56:55PM -0500, Tom Lane wrote:
>> No.  It would break client libraries, which only expect command tags
>> INSERT, UPDATE, DELETE to be followed by counts.

> And MOVE, right?

Mph ... PQcmdTuples only knows about INSERT/UPDATE/DELETE.  Looks like
we already made this mistake once before ;-).

			regards, tom lane



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-22 23:49  Hiroshi Inoue <Inoue@tpf.co.jp>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 1 reply; 9+ messages in thread

From: Hiroshi Inoue @ 2002-12-22 23:49 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgreSQL.org; pgsql-odbc

Tom Lane wrote:
> 
> Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > Good catch. Hmm this may be a serious problem because
> > there's no way to know the row count when we use EXECUTE
> > statements.
> 
> I wonder if EXECUTE could/should be made to return the appropriate
> command status string for the executed statement, instead of "EXECUTE".

Maybe it's preferable.

regards,
Hiroshi Inoue
	http://w2422.nsk.ne.jp/~inoue/



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

* Re: EXECUTE status (was Re: [ODBC] About server side prepare)
@ 2002-12-23 01:35  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: Hiroshi Inoue <Inoue@tpf.co.jp>
  0 siblings, 0 replies; 9+ messages in thread

From: Christopher Kings-Lynne @ 2002-12-23 01:35 UTC (permalink / raw)
  To: Hiroshi Inoue <Inoue@tpf.co.jp>; Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-hackers@postgresql.org; pgsql-odbc

> > Hiroshi Inoue <Inoue@tpf.co.jp> writes:
> > > Good catch. Hmm this may be a serious problem because
> > > there's no way to know the row count when we use EXECUTE
> > > statements.
> > 
> > I wonder if EXECUTE could/should be made to return the appropriate
> > command status string for the executed statement, instead of "EXECUTE".
> 
> Maybe it's preferable.

I agree.  Command status string is pretty essential!

Chris




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


end of thread, other threads:[~2002-12-23 01:35 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-12-20 14:36 EXECUTE status (was Re: [ODBC] About server side prepare) Tom Lane <tgl@sss.pgh.pa.us>
2002-12-20 17:46 ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-12-20 17:56   ` Tom Lane <tgl@sss.pgh.pa.us>
2002-12-20 17:59     ` Bruce Momjian <pgman@candle.pha.pa.us>
2002-12-20 18:02       ` Tom Lane <tgl@sss.pgh.pa.us>
2002-12-20 18:02     ` Jeroen T. Vermeulen <jtv@xs4all.nl>
2002-12-20 18:05       ` Tom Lane <tgl@sss.pgh.pa.us>
2002-12-22 23:49 ` Hiroshi Inoue <Inoue@tpf.co.jp>
2002-12-23 01:35   ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>

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