Getting field length in libpq - Mailing list pgsql-interfaces

From Bartek Teodorczyk
Subject Getting field length in libpq
Date
Msg-id 36E533E9.B72B4C64@it.pl
Whole thread Raw
Responses Re: [INTERFACES] Getting field length in libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-interfaces
I have following problem:
I need to get the length of field after executing query. For INT4 fields
it is simple (call PQfsize and get 4) but when I have VARCHAR(30) field
PQfsize returns -1. I cannot call PQgetlength for example first tuple
because this tuple can have 10 chars and PQgetlength returns 10 but I
need 30. Have you any solutions?

BarTeo

pgsql-interfaces by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: [INTERFACES] PgAccess 0.96 version released
Next
From: Tom Lane
Date:
Subject: Re: [INTERFACES] Getting field length in libpq