Re: Strange problem with create table as select * from table;

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Strange problem with create table as select * from table;
Date: 2011-11-03 15:30:34
Message-ID: 20111103153034.GB12010@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, Nov 03, 2011 at 08:23:01AM -0700, Adrian Klaver wrote:
> On Thursday, November 03, 2011 8:05:38 am hubert depesz lubaczewski wrote:
> > On Thu, Nov 03, 2011 at 08:04:19AM -0700, Adrian Klaver wrote:
> > > So just to be clear there is and never has been a -1 value for xobject_id
> > > in the source table?
> >
> > yes. min value of xobject_id is 1000, and we had trigger in place on the
> > table which logged all inserts/updates/deletes and the value -1 never
> > showed up (At least in the last couple of days, during which i was
> > making the copies).
> >
> > > So a select count(*) from sssssss.xobjects where xobject_id = -1 on the
> > > source table yields 0?
> >
> > yes, that's correct. both using index, and usingf seq scan.
>
> Hmmm. Now we await the results of the tests Tom suggested. Just a thought, any
> other strange behavior, hiccups in the database over the past couple of days?

no. it's doing it's job without problems.

other tests are running, but simple question - how to get number of rows
affected from psql?

create table xxx as select * from xobjects;
returns just:
SELECT

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
http://depesz.com/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2011-11-03 15:37:54 Re: Strange problem with create table as select * from table;
Previous Message hubert depesz lubaczewski 2011-11-03 15:29:37 Re: Strange problem with create table as select * from table;

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-11-03 15:37:54 Re: Strange problem with create table as select * from table;
Previous Message hubert depesz lubaczewski 2011-11-03 15:29:37 Re: Strange problem with create table as select * from table;