Skip site navigation (1) Skip section navigation (2)

Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Bernd Helmle <mailings(at)oopsware(dot)de>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)
Date: 2011-04-03 23:16:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sun, Apr 3, 2011 at 1:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> IMO the real problem is essentially that GUC assign hooks have two
>> functions, checking and canonicalization of the value-to-be-stored
>> versus executing secondary actions when an assignment is made; and
>> there's no way to get at just the first one.

> Yes, I think that's right.  A related point is that the API for assign
> hooks is not consistent across all data types: string assign hooks can
> return a replacement value, whereas everyone else can only succeed or
> fail.

Right.  In the original design we only foresaw the need to canonicalize
string values, so that's why it's like that.  This change will make it
more consistent.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Merlin MoncureDate: 2011-04-03 23:40:01
Subject: Re: Process local hint bit cache
Previous:From: Robert HaasDate: 2011-04-03 22:33:03
Subject: Re: GUC assign hooks (was Re: wal_buffers = -1 and SIGHUP)

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group