Re: [INTERFACES] More protocol discussion: breaking down query processing

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: [INTERFACES] More protocol discussion: breaking down query processing
Date: 2003-04-09 05:05:31
Message-ID: 4513.1049864731@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Joe Conway <mail(at)joeconway(dot)com> writes:
> Tom Lane wrote:
>> These protocol operations are interoperable with the SQL-level commands
>> for prepared queries and cursors, in the sense that a prepared query or
>> open cursor can be created either way and then used either way.
>> (Alternatively we might think that this is a bad idea, and that
>> protocol-level operations should use a different namespace from SQL
>> commands, so that application-requested operations can't interfere with
>> state that the client-side library has set up. Any opinions?)

> Does this mean that a statement PREPAREd at the protocol level could be
> EXECUTEd at the sql level? If that's the case, I'd tend to agree it is a
> bad idea.

I'm of two minds about it. On the basis of flexibility and ease of
debugging I'd think that sharing one namespace is good. But I suppose
a client library that wants to defend itself against clueless
application programmers might prefer a separate namespace.

> I'd think that binary support at the protocol level would obsolete the
> need for the DECLARE BINARY CURSOR command.

Yeah, but making something obsolete is not the same as being willing to
remove it immediately. If we keep DECLARE BINARY CURSOR around, how
should it act?

> A related question: how difficult would it be to support the ability to
> specify specific attributes as binary, while the rest are not.

I'd prefer not to go there. It'd be messy and I don't see that it has
any use for common client libraries. (Remember that most of this
discussion has focused on serving client libs that don't want to know
very much about the queries they're passing on --- so how are they going
to know which columns to ask for in binary?)

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stu Krone 2003-04-09 05:29:17 How do you execute a postgresql function from perl?
Previous Message Tom Lane 2003-04-09 04:14:16 Re: pg_get_viewdef 7.4 et al

Browse pgsql-interfaces by date

  From Date Subject
Next Message Joe Conway 2003-04-09 05:47:03 Re: [INTERFACES] More protocol discussion: breaking down
Previous Message Tom Lane 2003-04-09 04:58:16 Re: Memory leak!!