Re: When should parameters be passed as text v. binary?

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Paula Kirsch <pl(dot)kirsch(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: When should parameters be passed as text v. binary?
Date: 2020-01-04 20:42:00
Message-ID: 8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/4/20 11:25 AM, Paula Kirsch wrote:

Please reply to list also.
Ccing list.

> In an extended-query, my understanding is that you can choose to pass
> the parameters as text or binary. I am trying to understand
> https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-EXT-QUERY
> and
> https://www.postgresql.org/docs/current/protocol-message-formats.html.
> Thus the question about the benefits/detriments of passing the
> parameters as binary or text.
>
> I am also having difficulty finding the postgresql documentation for the
> data type oid to pass to explicitly type the parameters.

https://www.postgresql.org/docs/11/catalog-pg-type.html

>
> Any suggestions or examples of parse-messages with a couple of
> parameters being passed would be appreciated.
>
> Thank you.
>
> On Sat, Jan 4, 2020 at 11:18 AM Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com
> <mailto:adrian(dot)klaver(at)aklaver(dot)com>> wrote:
>
> On 1/4/20 3:54 AM, Paula Kirsch wrote:
> > I'm just trying to understand the trade-offs between sending
> everything
> > always as text, all integer parameters as binary, floats as
> binary, etc.
>
>  From where to where and using what?
>
>
> --
> Adrian Klaver
> adrian(dot)klaver(at)aklaver(dot)com <mailto:adrian(dot)klaver(at)aklaver(dot)com>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Janes 2020-01-04 20:51:17 Re: How can I set a timeout for a locked table in Function ?
Previous Message Justin 2020-01-04 20:30:00 Re: When should parameters be passed as text v. binary?