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

Re: Extended Query Protocol Question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg <grigorey(at)yahoo(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Extended Query Protocol Question
Date: 2010-07-13 15:18:15
Message-ID: 29363.1279034295@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-novice
Greg <grigorey(at)yahoo(dot)co(dot)uk> writes:
> Well, portal name isthe samefor both bind and execute messages
> as for 2nd point: I triedcomposing Parse, Bind and Execute in the
> same buffer (with Sync message ending each)and then send data to
> the database as well as sending those messages one by oneand
> reading their response and still getting "portal does not exists"
> error when Execute message sent to the database.

Sync ends the transaction, if you haven't created a transaction block by
executing BEGIN.  It seems rather pointless to put more than one Sync
in an outgoing packet anyway.  Normally what you'd want is to send
Parse/Bind/Execute/Sync as one packet, because if the Parse or Bind
fails you don't want to try the Execute.

			regards, tom lane

In response to

Responses

pgsql-novice by date

Next:From: GregDate: 2010-07-13 15:28:01
Subject: Re: Extended Query Protocol Question
Previous:From: GregDate: 2010-07-13 15:06:25
Subject: Re: Extended Query Protocol Question

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