public inbox for [email protected]  
help / color / mirror / Atom feed
From: Igor Korot <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: pgsql-generallists.postgresql.org <[email protected]>
Subject: Re: Why there is no records?
Date: Mon, 16 Feb 2026 18:15:23 -0600
Message-ID: <CA+FnnTyio1AUiz48jHwHXXgr149c=YMRObJeKci+rGF9BkvSrw@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+FnnTw9zGdkdhT75qzA-dWBzbQB+QrMB-sx=+bcLA72DoRSzQ@mail.gmail.com>
	<[email protected]>

Thx.

On Mon, Feb 16, 2026 at 6:03 PM Adrian Klaver <[email protected]> wrote:
>
> On 2/16/26 15:59, Igor Korot wrote:
> > Hi,
> >
> > draft=# SELECT n.nspname, c.oid FROM pg_constraint c, pg_namespace n
> > WHERE c.oid = n.oid AND c.conname = 'leagues_pkey';
>
> Because you are doing:
>
> c.oid = n.oid
>
> which is comparing the pg_constraint.oid to the pg_namespace.oid which
> are not the same thing.
>
> You need:
>
> c.connamespace = n.oid
>
>
> >   nspname | oid
> > ---------+-----
> > (0 rows)
> >
> > draft=# SELECT * FROM pg_constraint WHERE conname = 'leagues_pkey';
> >    oid  |   conname    | connamespace | contype | condeferrable |
> > condeferred | convalidated | conrelid | contypid | conindid |
> > conparentid | confrelid | confupdtype | confdeltype | confmatchtype |
> > conislocal | coninhcount | connoinherit | conkey | confkey | conpfeqop
> > | conppeqop | conffeqop | confdelsetcols | conexclop | conbin
> > -------+--------------+--------------+---------+---------------+-------------+--------------+----------+----------+----------+-------------+-----------+-------------+-------------+---------------+------------+-------------+--------------+--------+---------+-----------+-----------+-----------+----------------+-----------+--------
> >   16395 | leagues_pkey |         2200 | p       | f             | f
> >        | t            |    16390 |        0 |    16394 |           0 |
> >         0 |             |             |               | t          |
> >         0 | t            | {1}    |         |           |           |
> >          |                |           |
> > (1 row)
> >
> > Thank you.
> >
> >
>
>
> --
> Adrian Klaver
> [email protected]






view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Why there is no records?
  In-Reply-To: <CA+FnnTyio1AUiz48jHwHXXgr149c=YMRObJeKci+rGF9BkvSrw@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox