Re: a very naive question about table names in Postgres

From: Craig McIlwee <craigm(at)vt(dot)edu>
To: Martin Mueller <martinmueller(at)northwestern(dot)edu>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: a very naive question about table names in Postgres
Date: 2021-12-31 20:41:14
Message-ID: CAGqBcTbuxtyBp8JKasjMPyiDPzLqAe1Ovokmk6aZ+e12TisQ7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

>
> I know that on my Mac the tables are kept in the data directory
>> /Users/martinmueller/Library/Application Support/Postgres/var-13. If I go
>> there I see that internally the tables have numbers. Somewhere in the
>> system there must be a table that maps the name I gave to table X to the
>> numerical inside the database.
>>
>
> Check the pg_class table in the system catalog. The numeric value is the
> OID.
>
> https://www.postgresql.org/docs/14/catalog-pg-class.html
>
> Craig
>

Whoops, spoke too soon. I believe it's actually the relfilenode value that
you want.

Craig

>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2021-12-31 21:06:21 Re: a very naive question about table names in Postgres
Previous Message Gavin Flower 2021-12-31 20:40:34 Re: a very naive question about table names in Postgres