pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Paula Kirsch <pl.kirsch@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: When should parameters be passed as text v. binary?
Date: Sat, 4 Jan 2020 12:42:00 -0800
Message-ID: <8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com> (raw)
In-Reply-To: <CAHaXFP+iU2Ztg4noFmsj11rwNGsK2g2mSH_fv-2y0LMTi3rVbA@mail.gmail.com>
References: <CAHaXFPJNy_g5srOJpqAf3Td+71zDoPTfBP+45p58qJdbjsJKaw@mail.gmail.com>
	<e884b9c7-41bd-04b9-b900-43b5a3822a8d@aklaver.com>
	<CAHaXFP+iU2Ztg4noFmsj11rwNGsK2g2mSH_fv-2y0LMTi3rVbA@mail.gmail.com>

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.klaver@aklaver.com 
> <mailto:adrian.klaver@aklaver.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.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (7+ messages)  latest in thread

Message-ID: <8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com>
Permalink:  ../8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com/
Also on:    postgresql.org/message-id/8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, pl.kirsch@gmail.com
  Subject: Re: When should parameters be passed as text v. binary?
  In-Reply-To: <8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com>
  References: <CAHaXFPJNy_g5srOJpqAf3Td+71zDoPTfBP+45p58qJdbjsJKaw@mail.gmail.com> <e884b9c7-41bd-04b9-b900-43b5a3822a8d@aklaver.com> <CAHaXFP+iU2Ztg4noFmsj11rwNGsK2g2mSH_fv-2y0LMTi3rVbA@mail.gmail.com> <8a9aa327-7cc0-0de8-8cae-c70a3ffc1648@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox