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

Re: Protocol & Transmitted Field Data

From: Greg <grigorey(at)yahoo(dot)co(dot)uk>
To: Kenneth Marshall <ktm(at)rice(dot)edu>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Protocol & Transmitted Field Data
Date: 2010-07-04 19:31:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice

--- On Sun, 4/7/10, Kenneth Marshall <ktm(at)rice(dot)edu> wrote:

From: Kenneth Marshall <ktm(at)rice(dot)edu>
Subject: Re: [NOVICE] Protocol & Transmitted Field Data
To: "Greg" <grigorey(at)yahoo(dot)co(dot)uk>
Cc: pgsql-novice(at)postgresql(dot)org
Date: Sunday, 4 July, 2010, 17:07

On Sun, Jul 04, 2010 at 04:00:25PM +0000, Greg wrote:
> Hi everyone, 
> I have a question regarding field format used to transmit data (when data is transmitted over the protocol): Is there a way to change field format used by database to transmit data from text to binary?
> Whats happening: I have 2 columns in a table, both integers, when they transmitted over to client, their values transmitted as a collection of characters e.g. number 1234567 represented as '1' '2' '3' '4' '5' '6' '7' instead of using 4 bytes for int4
> Thanks!

You need to use PQexecParams() with binary parameters. You can also request the results
in either binary or text:



In response to

pgsql-novice by date

Next:From: Darryl PyeDate: 2010-07-06 02:49:48
Subject: Join Scalability
Previous:From: Kenneth MarshallDate: 2010-07-04 16:07:07
Subject: Re: Protocol & Transmitted Field Data

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