Re: Updates of SE-PostgreSQL 8.4devel patches (r1389) - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Date
Msg-id 20090106121232.GA27789@alvh.no-ip.org
Whole thread Raw
In response to Updates of SE-PostgreSQL 8.4devel patches (r1389)  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Responses Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
List pgsql-hackers
KaiGai Kohei wrote:

> Alvaro, could you check the patched code on reloptions.h, reloptions.c
> and rel.h? It is a working example of string reloptions, and I could
> found a few strange codes.

I'm intending to revisit the string code ... I was thinking yesterday
night that I shouldn't have committed it at all, and left it for a
subsequent patch that I had more chance to test properly :-(

> 1. HANDLE_STRING_RELOPTION() always put an empty string when
>    optstring->default_isnull is true, even if user gives a
>    valid string reloption.

This is a plain bug, sorry.

> 2. HANDLE_STRING_RELOPTION() cannot handle an offset style.
>    The patched one enables to put reloption string on the
>    tail of StdRdOptions structure, and adjust offset value.

I'll look at it, thanks.

> 3. Why the "StdRdOptions lopts;" is necessary?

It is like this because the autovacuum patch adds a few more options and
I want to have the chance to not allocate the part belonging to
autovacuum when none of the options are present.

> And, I have a request.
> 4. Is it possible to support a call-back to validate a given
>    string reloption? I want to check whether the given default
>    Row-level ACLs has a valid format, or not.

Hmm, why a callback and not just call the validation function in
heap_reloptions?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Time to finalize patches for 8.4 beta
Next
From: Tom Lane
Date:
Subject: Re: [GENERAL] ERROR: failed to find conversion function from "unknown" to text