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

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: (view raw, whole thread or download thread mbox)
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


pgsql-novice by date

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

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