Re: pg_ls_tmpdir()

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Christoph Berg <myon(at)debian(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_ls_tmpdir()
Date: 2018-10-02 16:32:58
Message-ID: 47759E3E-1C48-4272-B972-AF72F6B8EE72@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/2/18, 7:22 AM, "Andrew Dunstan" <andrew(dot)dunstan(at)2ndquadrant(dot)com> wrote:
> On 10/02/2018 08:00 AM, Laurenz Albe wrote:
>> Christoph Berg wrote:
>>> Re: Bossart, Nathan 2018-10-01 <69FD7E51-2B13-41FD-9438-17395C73F5BF(at)amazon(dot)com>
>>>>> 1. Do we really need two functions, one without input argument
>>>>> to list the default tablespace?
>>>>> I think that anybody who uses with such a function whould
>>>>> be able to feed the OID of "pg_default".
>>>> That seems reasonable to me. I've removed the second version of the
>>>> function.
>>> You could make that one argument have a DEFAULT value that makes it
>>> act on pg_default.
>> I looked at that, and I don't think you can add a DEFAULT for
>> system functions installed during bootstrap.
>> At least I failed in the attempt.
>
>
> See the bottom of src/backend/catalog/system_views.sql starting around
> line 1010.

AFAICT the cleanest way to do this in system_views.sql is to hard-code
the pg_default tablespace OID in the DEFAULT expression. So, it might
be best to use the two function approach if we want pg_ls_tmpdir() to
default to the pg_default tablespace.

Nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2018-10-02 16:45:04 Re: has_column_privilege behavior (was Re: Assert failed in snprintf.c)
Previous Message Stephen Frost 2018-10-02 16:10:49 Re: has_column_privilege behavior (was Re: Assert failed in snprintf.c)