Re: [HACKERS] Libpq: PQftype, PQfsize

2010-08-12 Thread Bozena Potempa
the correct value when using a type cast, so it solves my current problem. Perhaps you will implement the exact column size for querries with character functions somwhere in the future. It is a nice feature, which is implemented by Oracle or MS SQL Server. Do not know about MySQL. Regards, Bo

Re: [HACKERS] Libpq: PQftype, PQfsize

2010-08-12 Thread Bozena Potempa
>From: Tom Lane [mailto:t...@sss.pgh.pa.us] [..] >"Bozena Potempa" writes: >> I have a test table with varchar(40) column. After executing the >> following >> query: >> select substr(fc,1,2) from test >> PQftype returns for the result column PG_TYP

[HACKERS] Libpq: PQftype, PQfsize

2010-08-10 Thread Bozena Potempa
Hi, I have a test table with varchar(40) column. After executing the following query: select substr(fc,1,2) from test PQftype returns for the result column PG_TYPE_TEXT and PQfsize returns -1. Is it the expected behaviour? The most suprising for me is PQfsize. Tested on PostgreSQL 8.4, 32-bit W