Size of varchar in an array

From: RW Shore <rws228(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Size of varchar in an array
Date: 2011-02-08 16:02:43
Message-ID: AANLkTintstYQ4Mv=edU=1GKYY8TAgyPGAow6gZudhjhQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using the following type definition:
create type typedef.BASIC_PEDIGREE as (
DATE_ADDED TIMESTAMP,
DESCRIPTION VARCHAR(128) [10]
)\c

I understand that PostgreSQL doesn't enforce the array length [10]. However,
I'd like to write an application that can retrieve this length AND the size
of the varchar that makes up the array. I can't find these values anyplace
in the various system catalogs or views. Does PostgreSQL keep this
information someplace and if so where? If there's no way to retrieve (say)
the max size of the varchar, does this mean that PostgreSQL does not enforce
the max size of this field as well as not enforcing the array bounds?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Michael 2011-02-08 16:19:32 Re: Displaying text appears as hex data
Previous Message Thom Brown 2011-02-08 14:38:02 Re: Displaying text appears as hex data