Skip site navigation (1) Skip section navigation (2)

Steps taken through while transmitting binary data

From: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Steps taken through while transmitting binary data
Date: 2005-06-13 07:37:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

What's the difference between server/client binary data conversions
[1] of these commands:

  i. "COPY ... TO ... WITH BINARY ..."
 ii. "DECLARE ... BINARY ..."
iii. PQexecParams(..., 1)

AFAIC, the method followed in (i) and (ii) is (omiting byte order conversions):
  {server| binary} -> {client| binary}

But in the way as (iii) (which requires proto 3.0):
  {server| binary -> char} -> {client| char -> binary}

To summarize, I wonder the handling steps taken through while
transmitting binary data. (I tried to figure it out from source code
by myself, but couldn't reach an answer.) Does it work as i tried to
explain above while using PQexecParams()? Namely do we require dummy
conversions while gathering binary data with PQexecParams()?

I'd be so appreciated for any kind of explanation.

[1] « Normal cursors return data in text format, the same as a SELECT
would produce. Since data is stored natively in binary format, the
system must do a _conversion_ to produce the text format. Once the
information comes back in text form, the client application may need
to _convert_ it to a binary format to manipulate it.» [from


pgsql-novice by date

Next:From: Ville LeinonenDate: 2005-06-13 11:15:17
Subject: Problems with trigger and function.
Previous:From: Verena RuffDate: 2005-06-12 21:44:08
Subject: Inheritance, foreign key constraint

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group