From: | "Day, David" <dday(at)redcom(dot)com> |
---|---|
To: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | ECPG and server datatypes vs client representations. |
Date: | 2011-06-09 14:06:04 |
Message-ID: | 401084E5E73F4241A44F3C9E6FD7942808190D2A@exch-01.redcom.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
I have an embedded application retrieving data from a postgres database using the ECPG client interface. One process acts as an intermediary for other tasks for r/w operations.
When the the pg interface task retrieves a row into a sql descriptor and inspects the column types for a declared Boolean field, The Client is given a string type with data value of 't'/'f'. Why is it (ECPGt_char) rather then ECPGt_bool ?
Very human friendly but I have a machine making decisions.
If I pass this column/data along as strings the other tasks are left to do less efficient comparisons to 't' or 'f' to asses a flag.
I suppose I could declare it an int column with a range of 1 or 0.
Is there anything more elegant ?
I am new to database programming and postgres.
( Any good postgres programming best practice guides out there ? )
Tnx
Dave
From | Date | Subject | |
---|---|---|---|
Next Message | tv | 2011-06-09 14:06:29 | Re: Write performance on a large database |
Previous Message | Merlin Moncure | 2011-06-09 13:44:02 | Re: plpgsql function with update and seeing changed data from outside during run |