2015-09-07 21:44 GMT+02:00 Andres Freund <and...@anarazel.de>:

> Hi,
>
> On 2015-09-02 22:58:21 +0200, Pavel Stehule wrote:
> > > Won't that mean that enum variables don't complete to default anymore?
>
> > no, it does
> >
> > #define Query_for_enum \
> > " SELECT name FROM ( "\
> > "   SELECT unnest(enumvals) AS name "\
> > "    FROM pg_catalog.pg_settings "\
> > "   WHERE pg_catalog.lower(name)=pg_catalog.lower('%s') "\
> > "   UNION SELECT 'DEFAULT' ) ss "\
> > ****************
> > "  WHERE pg_catalog.substring(name,1,%%d)='%%s'"
>
> Ah.
>
> I've added a quote_ident() around unnest() - otherwise the
> auto-completions for default_transaction_isolation will mostly be wrong
> due to spaces.
>
> I also renamed get_vartype into get_guctype, changed the comment as I
> found the reference to the pg type system confusing, and more
> importantly made it not return a static buffer.
>
> The spellings for boolean values were a relatively small subset of what
> the backend accepts - it's now on,off,true,false,yes,no,1,0. I'm not
> sure whether that's a good idea. Comments?
>

if somebody prefer true, false, and we will support only on, off, then the
tabcomplete will not be too user friendly :(

"1, 0" can be out - but other?

>
> Andres
>

Reply via email to