[PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement - Mailing list pgsql-hackers

From Manni Wood
Subject [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Date
Msg-id CAKWEB6rmnmGKUA87Zmq-s=b3Scsnj02C0kObQjnbL2ajfPWGEw@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hello!

I am submitting a patch as a part of a larger Retail DDL functions project described by Andrew Dunstan here: https://www.postgresql.org/message-id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.net

This patch creates a function pg_get_tablespace_ddl, designed to retrieve the full DDL statement for a tablespace. Users can obtain the DDL by providing the tablespace name, like so:

    SELECT pg_get_tablespace_ddl('regress_owner_tblsp');
                                           pg_get_tablespace_ddl
    ---------------------------------------------------------------------------------------------------
     CREATE TABLESPACE regress_owner_tblsp OWNER regress_user LOCATION '' WITH (random_page_cost = 3);


This patch includes documentation, comments, and regression tests, all of which pass successfully.

--
Best,

Manni Wood
EnterpriseDB 
Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Bug in pg_stat_statements
Next
From: Jim Jones
Date:
Subject: Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement