Skip site navigation (1) Skip section navigation (2)

Re: char(0)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com>
Cc: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>, Thomas Kellerer <spam_eater(at)gmx(dot)net>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: char(0)
Date: 2011-10-18 17:17:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com> writes:
> On 17.10.2011 16:41, Andreas Pflug wrote:
>> This is a little bit annoying on migration topics.
>> While not move on to a cleaner approach during the migration and use a
>> "boolean not null"?
>> Sounds much too straight forward, not mysql-ish artistic enough...

> Depends if you want / are able to touch the application source code or not.

If you're expecting to move a mysql application to postgres with zero
source code changes, you're living in a fantasy world anyway ... but
this difference is hardly likely to be your worst problem.

AFAICT the SQL standard is perfectly clear on this.  *Values* of type
varchar can be of zero length, but that does not mean that you can
*declare* a column to be varchar(0), and that NOTE says specifically
that you can't.

			regards, tom lane

In response to

  • Re: char(0) at 2011-10-18 14:38:37 from Susanne Ebrecht

pgsql-bugs by date

Next:From: Tom LaneDate: 2011-10-18 18:22:20
Subject: Re: incompatible pointer type
Previous:From: Kevin GrittnerDate: 2011-10-18 16:44:41
Subject: Re: Tablespace files deleted in continuous run

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group