Re: [PATCH][PROPOSAL] Add enum releation option type - Mailing list pgsql-hackers

From Nikolay Shaplov
Subject Re: [PATCH][PROPOSAL] Add enum releation option type
Date
Msg-id 9521565.ljkCOhfioU@x200m
Whole thread Raw
In response to Re: [PATCH][PROPOSAL] Add enum releation option type  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
В письме от 9 февраля 2018 18:45:29 пользователь Alvaro Herrera написал:

> > 1. I've changed error message from 'Valid values are "XXX", "YYY" and
> > "ZZZ".' to 'Valid values are "XXX", "YYY", "ZZZ".' to make a code a bit
> > simpler. If it is not acceptable, please let me know, I will add "and" to
> > the string.
> I don't think we care about this, but is this still the case if you use
> a stringinfo?
>
> > 2. Also about the string with the list of acceptable values: the code that
> > creates this string is inside parse_one_reloption function now.
>
> I think you could save most of that mess by using appendStringInfo and
> friends.

Here is the second verion of the patch where I use appendStringInfo to prepare
error message. The code is much more simple here now, and it now create value
list with "and" at the end: '"xxx", "yyy" and "zzz"'


--
Do code for fun.
Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: tapeblocks is uninitialized in logtape.c
Next
From: Alvaro Herrera
Date:
Subject: Re: tapeblocks is uninitialized in logtape.c