Re: [DOCS] Moving tablespaces - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: [DOCS] Moving tablespaces
Date
Msg-id CABUevEy9MurQp23B0Z7r3jqDoW4N4BHPwnTgiNqNFY3jAJbFEg@mail.gmail.com
Whole thread Raw
In response to Re: [DOCS] Moving tablespaces  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [DOCS] Moving tablespaces
List pgsql-hackers
On Tue, Dec 6, 2011 at 16:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Magnus Hagander <magnus@hagander.net> writes:
>> AFAICT, it should be as simple as the attached.
>
> Oh, one other thought is that the function body has to be
> conditionalized on HAVE_READLINK (the fact that you forgot that
> somewhere else isn't an excuse for not doing it here).  IIRC,
> only the two built-in tablespaces can exist when not HAVE_READLINK,
> so it seems sufficient to handle those cases and then PG_RETURN_NULL
> (or maybe throw error) when not HAVE_READLINK.

Hmm. good point.

Throwing an error seems a lot more safe in this case than just
returning NULL. Since it's a situtation that really shouldn't happen.
Maybe an assert, but I think a regular ereport(ERROR) would be the
best.


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [DOCS] Moving tablespaces
Next
From: Tom Lane
Date:
Subject: Re: [DOCS] Moving tablespaces