Re: Table with seemingly duplicated primary key values

From: Aleksander Łukasz <allllllx(at)gmail(dot)com>
To: Melvin Davidson <melvin6925(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Table with seemingly duplicated primary key values
Date: 2015-12-22 17:24:17
Message-ID: CAGTk8=OVyGCF8ukw=E-O4uWpYFm-axfOjUUYGXL+7srDdLC--Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi, thanks for your reply.

2015-12-22 16:34 GMT+01:00 Melvin Davidson <melvin6925(at)gmail(dot)com>:

> 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)

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2015-12-22 17:40:18 Re: uuid-ossp: Performance considerations for different UUID approaches?
Previous Message Brendan McCollam 2015-12-22 17:07:30 uuid-ossp: Performance considerations for different UUID approaches?