Search Postgresql Archives

Re: Table with seemingly duplicated primary key values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, thanks for your reply.

2015-12-22 16:34 GMT+01:00 Melvin Davidson <melvin6925@xxxxxxxxx>:
Please. Always, ALWAYS, give the PostgreSQL version and O/S when reporting a problem.

First, WHAT IS THE POSTGRESQL VERSION?????
       WHAT IS THE O/S?????

# select version();
                                               version                                                
------------------------------------------------------------------------------------------------------
 PostgreSQL 9.4.5 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2, 64-bit
(1 row)

 
       Then try this:
select a.ctid, a.id, a.field1,
          b.ctid, b.id, b.field1
  from some_table a,
         some_table b
 WHERE a.ctid <> b.ctid
   AND a.id = b.id;
 
    ctid    |   id    |               field1             |    ctid    |   id    |               field1                
------------+---------+----------------------------------+------------+---------+----------------------------------
 (79664,59) | 2141750 |                                  | (79772,23) | 2141750 | some_value1
 (79772,23) | 2141750 | some_value1                      | (79664,59) | 2141750 | 
(2 rows)
 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux