Re: Difference for Binary format vs Text format for client-server communication

2020-07-26 Thread Andy Fan
On Sun, Jul 26, 2020 at 1:49 AM Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 2020-07-16 18:52, Andy Fan wrote: > > The reason I ask this is because I have a task to make numeric output > > similar to oracle. > > > > Oracle: > > > > SQL> select 2 / 1.0 from dual; > > > > 2

Re: Difference for Binary format vs Text format for client-server communication

2020-07-25 Thread Peter Eisentraut
On 2020-07-16 18:52, Andy Fan wrote: The reason I ask this is because I have a task to make numeric output similar to oracle. Oracle: SQL> select 2 / 1.0 from dual;      2/1.0 --          2 PG: postgres=# select  2 / 1.0;       ?column?  2. (1

Difference for Binary format vs Text format for client-server communication

2020-07-16 Thread Andy Fan
Hi: Every pg_type has typinput/typoutput and typreceive/typsend they are used for text format and binary format accordingly. What is the difference between them in practice? For example, for a PG user, shall they choose binary format or text format? Actually I don't even know how to set this i