Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.postgresql > #305

Re: User-defined type send/recv vs. out/in

From Jasen Betts <jasen@xnet.co.nz>
Newsgroups comp.databases.postgresql
Subject Re: User-defined type send/recv vs. out/in
Date 2012-02-14 11:15 +0000
Organization Dis (not Dat) Organisation
Message-ID <jhdfp4$s66$1@reversiblemaps.ath.cx> (permalink)
References <jha76n$mii$1@speranza.aioe.org> <jhaldt$2i3$1@reversiblemaps.ath.cx> <jhbu1c$v15$1@speranza.aioe.org>

Show all headers | View raw


On 2012-02-13, Don Y <this@isnotme.com> wrote:

> send and recv are for "binary I/O".  The first thing that comes
> to mind is a *dump*.  But, dumps generate actual SQL so...
> (obviously, there is a way that send/recv can be used.  The
> question is:  what drives/invokes that and what are the
> consequences if it is not implemented?)

obvously the text form is need for server features like COPY ... TO
and COPY ... FROM , (and the binary form when using the WITH BINARY
clause on COPY) but this is not the whole picture...

this page discusses binary format when using libpq
http://www.postgresql.org/docs/9.1/static/libpq-exec.html

It seems if you use a special query function like PQexecparams 
you can ask for the results in binary else if you use
ordinary PQexec you're only going to get them in text.

if you're not using libpq (eg using java or odbc) yuo'll probably only
be able to use the text form.

>> there's a mailing list "postgresql.hackers" where the people who
>> work on the deep internals hang out. you can reach it thuough
>> gmane if you prefer an NNTP interface, but you need to sign up at
>> http://www.postgresql.org/community/lists/ to post.
>
> Yes, I've been trying to avoid pestering those folks on the
> assumption that they have better things to do than attend to my
> "simple" questions  :-/  I figured the user types are exposed
> in the manual (whereas much of the internals are NOT) so hoping
> other "users" would have first-hand experience.

The developers (especially Tom Lane) seem to be happy to help out
people with tricky questions in the general mailing list. 
that's a high volume list (~100/day).  people with easy questions are
usually helped by the other list members.

-- 
⚂⚃ 100% natural

--- Posted via news://freenews.netfront.net/ - Complaints to news@netfront.net ---

Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

User-defined type send/recv vs. out/in Don Y <this@isnotme.com> - 2012-02-12 22:31 -0700
  Re: User-defined type send/recv vs. out/in Jasen Betts <jasen@xnet.co.nz> - 2012-02-13 09:33 +0000
    Re: User-defined type send/recv vs. out/in Don Y <this@isnotme.com> - 2012-02-13 14:06 -0700
      Re: User-defined type send/recv vs. out/in Jasen Betts <jasen@xnet.co.nz> - 2012-02-14 11:15 +0000
        Re: User-defined type send/recv vs. out/in Don Y <this@isnotme.com> - 2012-02-14 22:57 -0700

csiph-web