Re: pg_tablespace_databases - Mailing list pgsql-patches

From Andreas Pflug
Subject Re: pg_tablespace_databases
Date
Msg-id 40E51191.1070104@pse-consulting.de
Whole thread Raw
In response to Re: pg_tablespace_databases  (Joe Conway <mail@joeconway.com>)
Responses Re: pg_tablespace_databases  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Joe Conway wrote:

>
> Attached is the patch I plan to apply. There are a couple of changes
> from what was posted.
>
> 1) You must have meant tablespace instead of namespace here:
> ------------------------------------------------------------
> +      <row>
> +
> <entry><literal><function>pg_tablespace_databases</function>(<parameter>namespace_oid</parameter>)</literal></entry>
>
> +       <entry><type>setof oid</type></entry>


Of course. I just call everything namespace :-)

> 2) This allocation size was a bit ambigous and I think based on a once
> longer tablespace directory name:
> ------------------------------------------------------------
> +        fctx->location = (char*)palloc(strlen(DataDir)+16+10+1);


This size calculation originated (copy/paste) from
commands/tablespace.c, should be clarified there too (and "pg_tblspc" is
hardcoded in strings, could be extracted to a macro definition).

Regards,
Andreas



pgsql-patches by date:

Previous
From: Simon Riggs
Date:
Subject: Re: PITR Archive Recovery
Next
From: Daniel Baldoni
Date:
Subject: First attempt: support for "\dg" in psql