Re: Strange problem with create table as select * from table; - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Strange problem with create table as select * from table;
Date
Msg-id 20111103213133.GA29426@depesz.com
Whole thread Raw
In response to Re: Strange problem with create table as select * from table;  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Strange problem with create table as select * from table;  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> I would like to know the ctid's of the -1 rows in the copied table,
> along with the ctid's of the rows they share magic_ids with, and
> the ctid's of the rows with those same magic_ids in the original.
> I'm wondering whether the affected rows are physically clustered ...

i tried:
create table qqq as select cmax as o_cmax, xmax as o_xmax, cmin as
o_cmin, xmin as o_xmin, ctid as o_ctid, * from sssssss.xobjects;

but the resulting table didn't have -1 values:
$ select xobject_id, count(*) from qqq group by 1 having count(*) > 1;

                                                                              
 xobject_id | count

                                                                              
------------+-------
(0 rows)

$ select o_cmax,o_xmax,o_cmin,o_xmin,o_ctid, xobject_id, order_id from qqq where xobject_id = -1;

                                                                       
 o_cmax | o_xmax | o_cmin | o_xmin | o_ctid | xobject_id | order_id

                                                                              
--------+--------+--------+--------+--------+------------+----------
(0 rows)

i'm checking now something else, but later will try to get better grasp on those bad rows.

Best regards,

depesz

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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Strange problem with create table as select * from table;
Next
From: Tom Lane
Date:
Subject: Re: Strange problem with create table as select * from table;