Re: [QUESTIONS] backend dying on insert on 6.3, not dying on 6.2.1 p7

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: ccb(at)kukla(dot)tiac(dot)net
Cc: hshaw(at)successnet(dot)net, hackers(at)postgreSQL(dot)org (PostgreSQL-development)
Subject: Re: [QUESTIONS] backend dying on insert on 6.3, not dying on 6.2.1 p7
Date: 1998-03-25 01:28:49
Message-ID: 199803250128.UAA22972@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> I've seen this myself on Solaris. If your default value as specified
> in the CREATE TABLE statement is not exactly as long as the declared
> width of the field, the backend dies with an assertion as soon as you
> INSERT a record that needs to use the default.
>
> CREATE TABLE foo
> (
> i INT,
> a CHAR(4) DEFAULT 'x'
> );
>
> INSERT INTO a (i) VALUES (23);
>
> Will blow up the backend.
>
> CREATE TABLE foo
> (
> i INT,
> a CHAR(4) DEFAULT 'x '
> );
>

This does not surprise me entirely, especially when char() fails but
varchar() and text work. It has to do with the way we handle char().
Can someone familiar with default handling checking into this.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-25 01:47:01 Re: AW: [HACKERS] Re: PostgreSQL reference manual
Previous Message Michal Mosiewicz 1998-03-24 23:01:14 Patch 6.3-6.3.1 wrong?