Thread: BUG #13860: Duplicated primary key

BUG #13860: Duplicated primary key

From
baso10dev@gmail.com
Date:
The following bug has been logged on the website:

Bug reference:      13860
Logged by:          baso10
Email address:      baso10dev@gmail.com
PostgreSQL version: 9.4.5
Operating system:   Debian 4.9.2-10 64-bit
Description:

Table has duplicated values in primary key column.

I have a table A.
I have created table B that inherits table A.

After playing around I noticed there are duplicate keys in table A.

Thanks

Re: BUG #13860: Duplicated primary key

From
"David G. Johnston"
Date:
On Mon, Jan 11, 2016 at 3:34 PM, <baso10dev@gmail.com> wrote:

> The following bug has been logged on the website:
>
> Bug reference:      13860
> Logged by:          baso10
> Email address:      baso10dev@gmail.com
> PostgreSQL version: 9.4.5
> Operating system:   Debian 4.9.2-10 64-bit
> Description:
>
> Table has duplicated values in primary key column.
>
> I have a table A.
> I have created table B that inherits table A.
>
> After playing around I noticed there are duplicate keys in table A
>

=E2=80=8BPlease ponder for a moment how anyone would be able to help you so=
lely
based upon the information you've provided.

If you need help figuring out what other information you should supply
please read the following.

=E2=80=8Bhttp://www.postgresql.org/docs/current/static/bug-reporting.html

David J.

Re: BUG #13860: Duplicated primary key

From
John R Pierce
Date:
On 1/11/2016 2:34 PM, baso10dev@gmail.com wrote:
> The following bug has been logged on the website:
>
> Bug reference:      13860
> Logged by:          baso10
> Email address:baso10dev@gmail.com
> PostgreSQL version: 9.4.5
> Operating system:   Debian 4.9.2-10 64-bit
> Description:
>
> Table has duplicated values in primary key column.
>
> I have a table A.
> I have created table B that inherits table A.
>
> After playing around I noticed there are duplicate keys in table A.
>
> Thanks


thats not exactly a reproducible bug as reported.    Its also a 'should
never happen' sort of thing, about the only way I can see it happening
is if the primary key index somehow got corrupted (typically due to
hardware problems).

(do note, I'm just a fellow user, not a member of the PG core team or
anything...  please reply to the pgsql-bugs list rather than me directly).


--
john r pierce, recycling bits in santa cruz

Re: BUG #13860: Duplicated primary key

From
Tom Lane
Date:
baso10dev@gmail.com writes:
> I have a table A.
> I have created table B that inherits table A.
> After playing around I noticed there are duplicate keys in table A.

Most likely, what you're seeing is the behavior described in

http://www.postgresql.org/docs/9.4/static/ddl-inherit.html#DDL-INHERIT-CAVEATS

specifically that a unique constraint on A doesn't apply to B nor
vice versa.

If that's not it, we're going to need a concrete example.

            regards, tom lane

Re: BUG #13860: Duplicated primary key

From
Baso10 Dev
Date:
Yes, I am seeing behaviour like in the link. I guess it is not a bug then.

Regards,
Domen

2016-01-12 1:39 GMT+02:00 Tom Lane <tgl@sss.pgh.pa.us>:

> baso10dev@gmail.com writes:
> > I have a table A.
> > I have created table B that inherits table A.
> > After playing around I noticed there are duplicate keys in table A.
>
> Most likely, what you're seeing is the behavior described in
>
>
> http://www.postgresql.org/docs/9.4/static/ddl-inherit.html#DDL-INHERIT-CAVEATS
>
> specifically that a unique constraint on A doesn't apply to B nor
> vice versa.
>
> If that's not it, we're going to need a concrete example.
>
>                         regards, tom lane
>