Re: simple update closes connection. why?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: joseph speigle <joe(dot)speigle(at)jklh(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: simple update closes connection. why?
Date: 2004-02-01 17:02:50
Message-ID: 19589.1075654970@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

joseph speigle <joe(dot)speigle(at)jklh(dot)us> writes:
> i had altered the table when it was okay with the following sequence

> alter table calling add column uname character varying(20);
> alter table calling alter column uname set not null;
> said I couldn't do that because there were null values in it, so that's when i tried the
> update calling set uname='joe';
> and got errors.

Hmm. That's interesting and possibly relevant, but it can't be the
whole story --- people have been doing that for years. What else can
you tell us about the history of this table?

> (gdb) bt
> #0 0x0806b854 in nocachegetattr (tuple=0x82f5b78, attnum=1, tupleDesc=0x406f23a0, isnull=0xbfffe9d3 "") at heaptuple.c:349

I'm beginning to think you must have corruption in the system catalogs,
because there's no way that control should have reached that line for
this table, seeing that all the columns are variable-width. Could we
see the output of
select * from pg_attribute where attnum > 0 and attrelid = 'calling'::regclass;

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Joe Conway 2004-02-01 18:29:45 Re: "NULL value without indicator"
Previous Message Tom Lane 2004-02-01 16:16:33 Re: quote style in buffer