Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 1806BB5DC31 for ; Fri, 14 Oct 2011 15:36:28 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 11563-07 for ; Fri, 14 Oct 2011 18:36:20 +0000 (UTC) X-Greylist: delayed 00:06:38.543137 by SQLgrey-1.8.0-rc2 Received: from mail87.messagelabs.com (mail87.messagelabs.com [216.82.250.19]) by mail.postgresql.org (Postfix) with ESMTP id 7E5D8B5DC2A for ; Fri, 14 Oct 2011 15:36:20 -0300 (ADT) X-Env-Sender: TGood@svwsjmc.org X-Msg-Ref: server-15.tower-87.messagelabs.com!1318616979!35431957!1 X-Originating-IP: [69.195.41.67] X-StarScan-Version: 6.3.6; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17485 invoked from network); 14 Oct 2011 18:29:40 -0000 Received: from unknown (HELO mail.svwsjmc.org) (69.195.41.67) by server-15.tower-87.messagelabs.com with AES128-SHA encrypted SMTP; 14 Oct 2011 18:29:40 -0000 Received: from SVWEMAIL.svwestj.local ([172.22.80.151]) by SVWEMAIL ([172.22.80.151]) with mapi; Fri, 14 Oct 2011 14:29:39 -0400 From: "Good, Thomas" To: Adam Cornett , "ktm@rice.edu" CC: "pgsql-sql@postgresql.org" Date: Fri, 14 Oct 2011 14:28:15 -0400 Subject: Re: Tripping over (my own) stupidity - VARCHAR declaration minus specificity Thread-Topic: [SQL] Tripping over (my own) stupidity - VARCHAR declaration minus specificity Thread-Index: AcyKnns74E2WTkSyR62q7yszD734mgAAI50C Message-ID: References: <20111014180919.GY10975@staff-mud-56-27.rice.edu>, In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.4 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FROM_DOMAIN_NOVOWEL=0.5 X-Spam-Level: X-Archive-Number: 201110/20 X-Sequence-Number: 35904 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 m= inus specificity On Fri, Oct 14, 2011 at 2:09 PM, 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 > 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 inte= nded solely for the use of the individual or entity to who they are address= ed. This communication may contain protected health information and/or mate= rial protected by the attorney-client privilege. If you are not the intende= d recipient or the person responsible for delivering the e-mail to the inte= nded recipient, be advised that you have received this e-mail in error and = that any use, dissemination, forwarding, printing, or copying for this e-ma= il is strictly prohibited. if you have received this e-mail in error, pleas= e delete the message and attachments and notify the sender immediately.