From: Good, Thomas <TGood@svwsjmc.org>
To: Adam Cornett <adam.cornett@gmail.com>
To: ktm@rice.edu <ktm@rice.edu>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity
Date: Fri, 14 Oct 2011 14:28:15 -0400
Message-ID: <C3FA421FEED237488E9820D1ED668F330AB5ACE4@SVWEMAIL> (raw)
In-Reply-To: <CAB5sPxZbF6RPdZdPVFhXYCmPf-mnHhkWit5LVe2PZPAo0EVF1A@mail.gmail.com>
References: <C3FA421FEED237488E9820D1ED668F330AB5ACE3@SVWEMAIL>
<CAB5sPxb7HotxjE9J-6hU6+hYy1RtOjQevUSfzdHGunZLW72DGw@mail.gmail.com>
<20111014180919.GY10975@staff-mud-56-27.rice.edu>
<CAB5sPxZbF6RPdZdPVFhXYCmPf-mnHhkWit5LVe2PZPAo0EVF1A@mail.gmail.com>
Thanks guys - yes Adam it seems to behave exactly like text, at least in my experience.
________________________________________
From: Adam Cornett [adam.cornett@gmail.com]
Sent: Friday, October 14, 2011 2:24 PM
To: ktm@rice.edu
Cc: Good, Thomas; pgsql-sql@postgresql.org
Subject: Re: [SQL] Tripping over (my own) stupidity - VARCHAR declaration minus specificity
On Fri, Oct 14, 2011 at 2:09 PM, ktm@rice.edu<mailto:ktm@rice.edu> <ktm@rice.edu<mailto:ktm@rice.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@svwsjmc.org<mailto:TGood@svwsjmc.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
This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to who they are addressed. This communication may contain protected health information and/or material protected by the attorney-client privilege. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, be advised that you have received this e-mail in error and that any use, dissemination, forwarding, printing, or copying for this e-mail is strictly prohibited. if you have received this e-mail in error, please delete the message and attachments and notify the sender immediately.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: TGood@svwsjmc.org, adam.cornett@gmail.com, ktm@rice.edu
Subject: Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity
In-Reply-To: <C3FA421FEED237488E9820D1ED668F330AB5ACE4@SVWEMAIL>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox