Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Jeroen Vermeulen
Matthieu Imbert wrote: scenario 1 - parse the textual representation of all results of requests to the database and convert textual timestamps to a binary format that i choose among those ones (number of microseconds since 2000-01-01, or a structure similar to pg_tm (but with microsecond

Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Matthieu Imbert
Jeroen Vermeulen wrote: Matthieu Imbert wrote: scenario 1 - parse the textual representation of all results of requests to the database and convert textual timestamps to a binary format that i choose among those ones (number of microseconds since 2000-01-01, or a structure similar to pg_tm

Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Heikki Linnakangas
Matthieu Imbert wrote: You mean that when results are asked in textual representation (the default), data is sent on network directly as text? Yes. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Merlin Moncure
On Wed, Oct 22, 2008 at 3:29 AM, Matthieu Imbert [EMAIL PROTECTED] wrote: Jeroen Vermeulen wrote: Matthieu Imbert wrote: scenario 1 - parse the textual representation of all results of requests to the database and convert textual timestamps to a binary format that i choose among those ones

Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Andrew Chernow
You mean that when results are asked in textual representation (the default), data is sent on network directly as text? yes. You should know that text/binary conversions rarely play a significant role in terms of performance. There are exceptions...large bytea columns, or enormous sets of

Re: [HACKERS] binary representation of datatypes

2008-10-22 Thread Merlin Moncure
On Wed, Oct 22, 2008 at 8:07 AM, Andrew Chernow [EMAIL PROTECTED] wrote: You mean that when results are asked in textual representation (the default), data is sent on network directly as text? You should know that text/binary conversions rarely play a significant role in terms of performance.

[HACKERS] binary representation of datatypes

2008-10-21 Thread Matthieu Imbert
Dear postgresql hackers, I would like to be able to get results from SQL commands directly in a binary format, instead of a textual one. Actually, I want to be able to get timestamps with their full precision (microsecond). googling around i found some threads on this mailing list about this:

Re: [HACKERS] binary representation of datatypes

2008-10-21 Thread Michael Meskes
On Tue, Oct 21, 2008 at 10:21:38AM +0200, Matthieu Imbert wrote: I would like to be able to get results from SQL commands directly in a binary format, instead of a textual one. Actually, I want to be able to get timestamps with their full precision (microsecond). Are you sure you cannot get

Re: [HACKERS] binary representation of datatypes

2008-10-21 Thread Matthieu Imbert
Michael Meskes wrote: On Tue, Oct 21, 2008 at 10:21:38AM +0200, Matthieu Imbert wrote: I would like to be able to get results from SQL commands directly in a binary format, instead of a textual one. Actually, I want to be able to get timestamps with their full precision (microsecond). Are

Re: [HACKERS] binary representation of datatypes

2008-10-21 Thread Merlin Moncure
On Tue, Oct 21, 2008 at 4:21 AM, Matthieu Imbert [EMAIL PROTECTED] wrote: Dear postgresql hackers, I would like to be able to get results from SQL commands directly in a binary format, instead of a textual one. Actually, I want to be able to get timestamps with their full precision

Re: [HACKERS] binary representation of datatypes

2008-10-21 Thread Michael Meskes
On Tue, Oct 21, 2008 at 01:37:44PM +0200, Matthieu Imbert wrote: Yes microseconds are available in textual mode but i do want to use binary mode. Let me explain why: ... if i'm correct, it seems obvious that the second scenario is more efficient (and less ugly). I wouldn't bet on scenario