Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com>
Cc: Manni Wood <manni(dot)wood(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Date: 2025-11-04 11:25:05
Message-ID: e7a254a8-8bbb-4ee7-ae38-d00cbf82ffad@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Nishant

On 04/11/2025 11:37, Nishant Sharma wrote:
> Using name as parameter is more user friendly than OID.
> Because users usually do not know the oids. Constructing
> the DDL from the name appears better as it contains a name
> in it. So, no gain in having an OID version of
> pg_get_tablespace_ddl.

Would you also say that having a pg_tablespace_size(oid) has no benefit?

I took a look at similar functions, and the only pattern I could
identify is that all of them take an oid parameter.

pg_tablespace_size: oid and name
pg_tablespace_location: oid
has_tablespace_privilege: oid, name, and text
pg_tablespace_databases: oid
...
pg_get_tablespace_ddl: name

I'm definitely not opposed to having just a name parameter, but I
thought it would be worth mentioning.

Best, Jim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2025-11-04 11:27:08 Re: tuple radix sort
Previous Message Peter Eisentraut 2025-11-04 11:21:27 Re: [PATCH] Fix Korean typo 'checkpoint' in log