Hi, Ron,

On Sat, Oct 31, 2026 at 1:24 AM Ron Johnson <[email protected]> wrote:
>
> Join pg_attribute.attrelid to pg_class.oid and thus you have the table's 
> relnamespace value.

>From the docs:

[quote]
relnamespace oid (references pg_namespace.oid)

The OID of the namespace that contains this relation
[/quote]

I have a schema name as a string.

Should I cast that value to something when I write
"pg_class.relnamespace = 'public'"?

Thank you.

>
> On Sat, Oct 31, 2026 at 1:34 AM Igor Korot <[email protected]> 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!


Reply via email to