public inbox for [email protected]  
help / color / mirror / Atom feed
Why there is no records?
3+ messages / 2 participants
[nested] [flat]

* Why there is no records?
@ 2026-02-16 23:59  Igor Korot <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Igor Korot @ 2026-02-16 23:59 UTC (permalink / raw)
  To: pgsql-generallists.postgresql.org <[email protected]>

Hi,

draft=# SELECT n.nspname, c.oid FROM pg_constraint c, pg_namespace n
WHERE c.oid = n.oid AND c.conname = 'leagues_pkey';
 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.






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why there is no records?
@ 2026-02-17 00:03  Adrian Klaver <[email protected]>
  parent: Igor Korot <[email protected]>
  0 siblings, 1 reply; 3+ messages in thread

From: Adrian Klaver @ 2026-02-17 00:03 UTC (permalink / raw)
  To: Igor Korot <[email protected]>; pgsql-generallists.postgresql.org <[email protected]>

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]






^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Why there is no records?
@ 2026-02-17 00:15  Igor Korot <[email protected]>
  parent: Adrian Klaver <[email protected]>
  0 siblings, 0 replies; 3+ messages in thread

From: Igor Korot @ 2026-02-17 00:15 UTC (permalink / raw)
  To: Adrian Klaver <[email protected]>; +Cc: pgsql-generallists.postgresql.org <[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]






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2026-02-17 00:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-02-16 23:59 Why there is no records? Igor Korot <[email protected]>
2026-02-17 00:03 ` Adrian Klaver <[email protected]>
2026-02-17 00:15   ` Igor Korot <[email protected]>

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