Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tl6lj-0005q6-4J for pgsql-general@arkaria.postgresql.org; Tue, 18 Dec 2012 23:40:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1Tl6lh-00037U-VL for pgsql-general@arkaria.postgresql.org; Tue, 18 Dec 2012 23:40:14 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tl6Wo-0001CQ-Iq for pgsql-general@postgresql.org; Tue, 18 Dec 2012 23:24:50 +0000 Received: from news.hub.org ([200.46.204.72]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1Tl6Wm-0004g3-OI for pgsql-general@postgresql.org; Tue, 18 Dec 2012 23:24:50 +0000 Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.5/8.14.5) with ESMTP id qBINOkNw011911 for ; Tue, 18 Dec 2012 19:24:46 -0400 (AST) (envelope-from news@news.hub.org) Received: from news.hub.org (news@localhost) by news.hub.org (8.14.5/8.14.5/Submit) with NNTP id qBINFgMU011248 for pgsql-general@postgresql.org; Tue, 18 Dec 2012 19:15:42 -0400 (AST) (envelope-from news) Date: Tue, 18 Dec 2012 19:15:42 -0400 (AST) From: News Subsystem Message-Id: <201212182315.qBINFgMU011248@news.hub.org> To: undisclosed-recipients:; X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Tue, 18 Dec 2012 15:15:41 -0800 (PST) Received: by 10.50.5.174 with SMTP id t14mr1993997igt.11.1355872541437; Tue, 18 Dec 2012 15:15:41 -0800 (PST) X-Newsgroups: pgsql.general Date: Tue, 18 Dec 2012 15:15:41 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.217.89.1; posting-account=lOEuBgoAAAD6Qw4dpoqeBAJHKoD58tcK User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6087737c-f946-4698-92f0-3ea72a56aa2b@googlegroups.com> Subject: question about varchar From: Rui Li Injection-Date: Tue, 18 Dec 2012 23:15:41 +0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable To: pgsql-general@postgresql.org In postgresql, we can create column as =93varchar(n)=94 where n is the size= of the char, or we can just define column as =93varchar=94 rli=3D# CREATE TABLE test (v1 varchar(100), v2 varchar); CREATE TABLE rli=3D# \d test Table "public.test" Column | Type | Modifiers --------+------------------------+----------- v1 | character varying(100) | v2 | character varying | so my question is: why should we even declare character varying(n) in postg= resql when there=92s an easier options to declaring character varying (with= out n)=20 is there any performance different between it? or some other reason we shou= ld use varchar(n) instead of just varchar? thanks for any help -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general