From: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org, "Wang, Mary Y" <mary(dot)y(dot)wang(at)boeing(dot)com> |
Subject: | Re: Migration - not null default '0' -> not null default 0 - confused |
Date: | 2010-03-31 01:03:40 |
Message-ID: | 201003301803.41035.adrian.klaver@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tuesday 30 March 2010 4:59:30 pm Jeff Davis wrote:
> On Tue, 2010-03-30 at 16:32 -0700, Adrian Klaver wrote:
> > 8.3 tightened up type casting. You cannot INSERT a '0' without casting it
> > to an integer i.e '0'::integer.
>
> I don't think that's accurate:
>
> postgres=# select version();
>
> version
>
> ---------------------------------------------------------------------------
>----------------------------------------- --
> PostgreSQL 9.0devel on x86_64-unknown-linux-gnu, compiled by GCC
> gcc-4.3.real (Ubuntu 4.3.2-1ubuntu12) 4.3.2, 64-bit
> (1 row)
>
> postgres=# create table ints(i int);
> CREATE TABLE
> postgres=# insert into ints values('0');
> INSERT 0 1
>
>
> Regards,
> Jeff Davis
My mistake. I could of swore I had problems with this when I first tried 8.3.
What happens when you rely on memory.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2010-03-31 02:09:09 | plPgSQL + CDIR/INET types ... |
Previous Message | Steve Atkins | 2010-03-31 00:21:17 | Re: Migration - not null default '0' -> not null default 0 - confused |