Re: [HACKERS] executing prepared select, missing RowDescription info
- Begin Forwarded Message - >From To:[EMAIL PROTECTED] Mon Apr 19 11:08:57 2004 Date: Mon, 19 Apr 2004 11:08:57 METDST To: [EMAIL PROTECTED] (Tom Lane) Subject: Re: [HACKERS] executing prepared select, missing RowDescription info In-Reply-To: <[EMAIL PROTECTED]>; from "Tom Lane" at Apr 18, 104 7:11 pm Content-Length: 899 Status: RO > > Kris Jurka <[EMAIL PROTECTED]> writes: > > When executing a prepared select statement, the returned RowDescription > > protocol message does not have any information for the table oid or column > > position. Running the equivalent select without prepare provides this > > information, so I don't see why the act of preparing and executing the > > statement removes this valuable data. Any insight on why it isn't there > > or how to fix it? > > Fixing this would be a tad messy, because the information is not > propagated up through a utility-statement Portal. I guess I would ask > why you're using EXECUTE at all; it's considerably less efficient than > invoking the prepared statement via the protocol-level operation for > doing so (Bind, then Execute). > > regards, tom lane > And how would I do this more efficient "Bind, then Execute" using libpq? TIA Regards, Christoph - End Forwarded Message - ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] executing prepared select, missing RowDescription info
Kris Jurka <[EMAIL PROTECTED]> writes: > When executing a prepared select statement, the returned RowDescription > protocol message does not have any information for the table oid or column > position. Running the equivalent select without prepare provides this > information, so I don't see why the act of preparing and executing the > statement removes this valuable data. Any insight on why it isn't there > or how to fix it? Fixing this would be a tad messy, because the information is not propagated up through a utility-statement Portal. I guess I would ask why you're using EXECUTE at all; it's considerably less efficient than invoking the prepared statement via the protocol-level operation for doing so (Bind, then Execute). regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[HACKERS] executing prepared select, missing RowDescription info
When executing a prepared select statement, the returned RowDescription protocol message does not have any information for the table oid or column position. Running the equivalent select without prepare provides this information, so I don't see why the act of preparing and executing the statement removes this valuable data. Any insight on why it isn't there or how to fix it? Kris Jurka ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html