Re: Field size

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: aliosa <constantinica_alin(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Field size
Date: 2012-08-16 12:53:41
Message-ID: CAAfz9KPg0Cb7uEpvO2ATs08OzzYi3Za2SDXT2BGUtS=qjx_7Wg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey aliosa

2012/8/16 aliosa <constantinica_alin(at)yahoo(dot)com>

> Hello
> I am using libpq to find information about fileds of table ( type and
> size).
> I have a problem with getting the sizeof varchar fields.
> If a table has a fiels varchar[35] and want to obtain 35.
> I used PQgetlength or PQfsize but is not good for my work.
> Can someone tell me what function shall I use to get the size of filed ?
>
You should use PQfmod().

--
// Dmitriy.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Wolfgang Keller 2012-08-16 14:04:48 Re: Visualize database schema
Previous Message Andrew Hastie 2012-08-16 10:46:35 Re: PG Installer - Licensing Issues