Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)

From: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>, pgsql-hackers(at)postgresql(dot)org, bruce(at)momjian(dot)us, tgl(at)sss(dot)pgh(dot)pa(dot)us, simon(at)2ndQuadrant(dot)com
Subject: Re: Updates of SE-PostgreSQL 8.4devel patches (r1389)
Date: 2009-01-08 01:26:19
Message-ID: 4965563B.1090801@ak.jp.nec.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera wrote:
> Agreed, it seems better. The attached patch adds that, a macro you
> originally requested and another one, and it also fixes an off-by-one
> bug I discovered while testing all of this. I also attach the testing
> patch I play with to check that this all works nicely.

| *** src/include/access/reloptions.h 6 Jan 2009 14:47:37 -0000 1.8
| --- src/include/access/reloptions.h 7 Jan 2009 13:31:25 -0000
| ***************
| *** 90,100 ****
| --- 90,103 ----
| double max;
| } relopt_real;
|
| + typedef void (*validate_string_relopt) (char *);
| +
| typedef struct relopt_string
| {
| relopt_gen gen;
| int default_len;
| bool default_isnull;
| + validate_string_relopt validate_cb;
| char default_val[1]; /* variable length */
| } relopt_string;

Could you deliver "bool validate" to the validate_string_relopt callback?
In this specification, invoked callback cannot know whether it should
really raise an error for invalid reloption, or not.

I prefer:
typedef void (*validate_string_relopt) (char *value, bool validate);

> Oh, the patch also removes a bunch of "continue" statements that, as far
> as I can tell, no longer work after the macros were wrapped in
> do { ... } while (0) :-( I don't see any nice way to put the facility
> back.
>
> Thanks for all the input.

Thanks,
--
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2009-01-08 01:42:46 Re: Potential Join Performance Issue
Previous Message KaiGai Kohei 2009-01-08 00:58:00 Re: New patch for Column-level privileges