Re: Fwd: Re: Sequence error ?

Lists: pgsql-novice
From: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Fwd: Re: Sequence error ?
Date: 2004-05-25 15:57:47
Message-ID: 200405251857.47084.aarni.ruuhimaki@kymi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Hi,

And thanks for the tip Tom.

There was a slight contradiction in this:

"country" integer DEFAULT '' NOT NULL,

Best regards,

Aarni

---------- Forwarded Message ----------

Subject: Re: [NOVICE] Sequence error ?
Date: Tue, 25 May 2004 10:44:51 -0400
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: aarni(dot)ruuhimaki(at)kymi(dot)com
Cc: pgsql-novice(at)postgresql(dot)org

Aarni =?iso-8859-1?q?Ruuhim=E4ki?= <aarni(dot)ruuhimaki(at)kymi(dot)com> writes:
> ERROR: invalid input syntax for integer: ""
> [from]
> INSERT INTO "users" VALUES (1,'xxxxxxxx','yyyyyyyy',0,'9999-12-12
> 00:00:00','2004-03-03
> 15:49:28.028026+02','xxxxxxxx','xxxxxxxxr','','','','','','','t',0,'t');

You didn't show us all the column definitions, but are any of the ninth
through fourteenth columns integers? That's certainly where I'd look on
the basis of this error ...

regards, tom lane

-------------------------------------------------------
This is a bugfree broadcast to you from a linux system.


From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>
Subject: Re: Fwd: Re: Sequence error ?
Date: 2004-05-25 17:39:10
Message-ID: 40B384BE.3010207@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Aarni Ruuhimäki wrote:

> Hi,
>
> And thanks for the tip Tom.
>
> There was a slight contradiction in this:
>
> "country" integer DEFAULT '' NOT NULL,

How was possible for you create that table ?

on 7.4.1 I get:

test=# create table test ( b integer, a integer default '' not null );
ERROR: invalid input syntax for integer: ""

test=# alter table test alter column b set default '' ;
ERROR: invalid input syntax for integer: ""

Regards
Gaetano Mendola


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Fwd: Re: Sequence error ?
Date: 2004-05-25 18:53:58
Message-ID: 26309.1085511238@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-novice

Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> Aarni Ruuhimki wrote:
>> There was a slight contradiction in this:
>> "country" integer DEFAULT '' NOT NULL,

> How was possible for you create that table ?

> on 7.4.1 I get:

> test=# create table test ( b integer, a integer default '' not null );
> ERROR: invalid input syntax for integer: ""

Yeah, but before 7.3 pg_atoi would have silently accepted '' as meaning
zero. So the problem wouldn't show up until Aarni updated ...

regards, tom lane