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

Re: How to obtain the max length of a varchar(50) field.

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: mauro <mauro(at)faresoftware(dot)it>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: How to obtain the max length of a varchar(50) field.
Date: 2011-05-05 09:03:36
Message-ID: BANLkTi=0pKw7vvjWwdQWv1LMaDhRsj9Jfg@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
On Thu, May 5, 2011 at 9:50 AM, Mauro Ziliani <mauro(at)faresoftware(dot)it> wrote:
> Hi all.
> I'm working with Postgres 9.0 and wxWidgets.
> I need to query the db about a field of a table.
>
> The table T has a field varchar(50).
>
> table: TAB0
> customer: varchar(50)
>
> How can I get the max size of the field?
>
> The PQfsize function give me -1 because the field has dynamic size.
>
> Can you help me?

Try PQfmod()

-- 
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

pgsql-novice by date

Next:From: Andreas KretschmerDate: 2011-05-05 09:03:40
Subject: Re: How to obtain the max length of a varchar(50) field.
Previous:From: ALT SHNDate: 2011-05-05 08:57:48
Subject: Re: [GRASS-user] OCR

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