Skip site navigation (1) Skip section navigation (2)

Getting field length in libpq

From: Bartek Teodorczyk <barteo(at)it(dot)pl>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Getting field length in libpq
Date: 1999-03-09 14:44:57
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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?


pgsql-interfaces by date

Next:From: Thomas G. LockhartDate: 1999-03-09 15:08:05
Subject: Re: [INTERFACES] Bug in sortin routine?
Previous:From: K.T.Date: 1999-03-09 14:23:35
Subject: Re: [GENERAL] the last row in a table

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group