Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id A8B081336B42 for ; Sat, 15 Jan 2011 03:57:58 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 04861-04 for ; Sat, 15 Jan 2011 07:57:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id 2C8F2133616B for ; Sat, 15 Jan 2011 03:57:51 -0400 (AST) Received: by qwa26 with SMTP id 26so3425535qwa.19 for ; Fri, 14 Jan 2011 23:57:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.184.208 with SMTP id cl16mr1501988qcb.105.1295078270750; Fri, 14 Jan 2011 23:57:50 -0800 (PST) Received: by 10.229.98.73 with HTTP; Fri, 14 Jan 2011 23:57:50 -0800 (PST) In-Reply-To: <4D312448.7030701@hogranch.com> References: <201101150332.p0F3W5B8085636@wwwmaster.postgresql.org> <17701.1295063507@sss.pgh.pa.us> <4D312448.7030701@hogranch.com> Date: Sat, 15 Jan 2011 07:57:50 +0000 Message-ID: Subject: Re: BUG #5839: pgAdmin makes bad query for creating a table when default value specified From: Dave Page To: John R Pierce Cc: pgsql-bugs@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.6 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7 X-Spam-Level: X-Archive-Number: 201101/108 X-Sequence-Number: 29130 On Sat, Jan 15, 2011 at 4:36 AM, John R Pierce wrote: > On 01/14/11 8:12 PM, Aren Cambre wrote: >> >> This came from pgAdmin's *Default value* field. This field is supposed to >> accept anything other than a string? > > default value can be any valid expression Exactly. pgAdmin doesn't have any way to know whether what you've entered is a plain string or an expression of some kind, so it leaves it to you to provide the quoting in this case. -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company