Re: new String(byte[]) performance

From: Barry Lind <blind(at)xythos(dot)com>
To: Aaron Mulder <ammulder(at)alumni(dot)princeton(dot)edu>
Cc: PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: new String(byte[]) performance
Date: 2002-10-22 17:04:37
Message-ID: 3DB58525.9040703@xythos.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Aaron Mulder wrote:
> Barry,
> Are you saying that the server returns everything as
> strings/characters no matter what? Like if it sends the number "123456"
> that will be 7 bytes (6+null), not 4 bytes (an int)? Can we make it send
> the 4-byte int value instead?

That is correct. The FE/BE protocol sends the data back and forth as
strings for all the data types. The only exception to this is if you
are using a 'binary cursor' inwhich case the data is sent in binary,
(however the byte order is platform dependent, which makes it a pain to
use binary cursors).

--Barry

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Teofilis Martisius 2002-10-22 17:19:24 Re: new String(byte[]) performance
Previous Message Aaron Mulder 2002-10-22 16:26:32 Re: new String(byte[]) performance