Re: Connecting pg_attribute with pg_namespace

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: Igor Korot <ikorot01(at)gmail(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Connecting pg_attribute with pg_namespace
Date: 2026-10-31 06:24:10
Message-ID: CANzqJaBbwVDh-Toan6aiPA=HKqbVk7poZ7D8VnhBDJJHwAbjAw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

Join pg_attribute.attrelid to pg_class.oid and thus you have the table's
relnamespace value.

On Sat, Oct 31, 2026 at 1:34 AM Igor Korot <ikorot01(at)gmail(dot)com> wrote:

> Hi,
> How do I add schema name to
>
> [code]
> SELECT attnum FROM pg_attribute WHERE attrelid = 'my_table_name';
> [/code]
>
> Thank you.
>
>
>

--
Death to <Redacted>, and butter sauce.
Don't boil me, I'm still alive.
<Redacted> lobster!

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2026-10-31 21:43:35 Re: Connecting pg_attribute with pg_namespace
Previous Message Igor Korot 2026-10-31 06:08:14 Connecting pg_attribute with pg_namespace