Re: Custom variables and flags, again - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Custom variables and flags, again
Date
Msg-id 15777.1226886863@sss.pgh.pa.us
Whole thread Raw
In response to Re: Custom variables and flags, again  (ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Responses Re: Custom variables and flags, again
List pgsql-hackers
ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> What happens
>> when we add some field or other to those structs?

> There are problems when we modify the middle fields in those
> structs, but it means modification of existing arguments in
> DefineCustomXXXVariable(); The same problems occur in both
> implementations.

No, they are not the same problems.  You can rely on the C compiler
to complain if you aren't passing enough arguments to a function.
You can't rely on it to complain if your struct constant is putting
values into the wrong fields.

Perhaps more to the point, guc_tables.h is a file that we don't even
want the majority of the backend including.  Why would we think it's
a good idea to make that part of the public API to external modules?
        regards, tom lane


pgsql-hackers by date:

Previous
From: ITAGAKI Takahiro
Date:
Subject: Re: Custom variables and flags, again
Next
From: ITAGAKI Takahiro
Date:
Subject: Re: Custom variables and flags, again