ECPG and server datatypes vs client representations.

Поиск
Список
Период
Сортировка
От Day, David
Тема ECPG and server datatypes vs client representations.
Дата
Msg-id 401084E5E73F4241A44F3C9E6FD7942808190D2A@exch-01.redcom.com
обсуждение исходный текст
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: Write performance on a large database
Следующее
От: Tom Lane
Дата:
Сообщение: Re: plpgsql function with update and seeing changed data from outside during run