From: | Greg <grigorey(at)yahoo(dot)co(dot)uk> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Extended Query Protocol Question |
Date: | 2010-07-13 15:28:01 |
Message-ID: | 427520.29975.qm@web24303.mail.ird.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Ok, tried sending combination of Parse/Bind/Exec/Sync messages - works like a charm.
Thanks Tom. Very appreciated. I couldn't get my head around that for few days now!
--- On Tue, 13/7/10, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [NOVICE] Extended Query Protocol Question
To: "Greg" <grigorey(at)yahoo(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Date: Tuesday, 13 July, 2010, 16:18
Greg <grigorey(at)yahoo(dot)co(dot)uk> writes:
> Well, portal name is the same for both bind and execute messages
> as for 2nd point: I tried composing 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 one and
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | DMan65 | 2010-07-13 23:25:59 | Need help doing a CSV import |
Previous Message | Tom Lane | 2010-07-13 15:18:15 | Re: Extended Query Protocol Question |