Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity

From: Adam Cornett <adam(dot)cornett(at)gmail(dot)com>
To: "ktm(at)rice(dot)edu" <ktm(at)rice(dot)edu>
Cc: "Good, Thomas" <TGood(at)svwsjmc(dot)org>, "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity
Date: 2011-10-14 18:24:13
Message-ID: CAB5sPxZbF6RPdZdPVFhXYCmPf-mnHhkWit5LVe2PZPAo0EVF1A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Oct 14, 2011 at 2:09 PM, ktm(at)rice(dot)edu <ktm(at)rice(dot)edu> wrote:

> On Fri, Oct 14, 2011 at 01:51:04PM -0400, Adam Cornett wrote:
> > On Fri, Oct 14, 2011 at 1:27 PM, Good, Thomas <TGood(at)svwsjmc(dot)org> wrote:
> >
> > > I created a table in a hurry and forgot to specify the max capacity for
> a
> > > varchar() data type.
> > > Can it be said what the max would be in a case like this (just
> curious)?
> > >
> > > thanks much
> > >
> >
> > According to
> > http://www.postgresql.org/docs/current/static/datatype-character.html,
> > "If character varying is used without length specifier, the type accepts
> > strings of any size. The latter is a PostgreSQL extension."
> >
> > -Adam Cornett
>
> And according to the documentation, the maximum size of a varchar is
> 1GB.
>
> Regards,
> Ken
>

Yes, 1GB is the limit for any column size. From what I can tell a varchar
without a size specified acts just like text.

-Adam

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Good, Thomas 2011-10-14 18:28:15 Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity
Previous Message ktm@rice.edu 2011-10-14 18:09:19 Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity