=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= <ilmari@ilmari.org> writes:
> Tom Lane <tgl@sss.pgh.pa.us> writes:
>> I think the reason the COMPLETE_WITH_ENUM_VALUE macro doesn't look
>> similar is that it hasn't made an attempt to work with input that
>> the user didn't quote --- that is, if you type
>> alter type planets rename value ur<TAB>
>> it just fails to match anything, instead of providing "'uranus'".
>> Should we upgrade that likewise?`
> The comment says it will add the quote before text if it's not there, so
> maybe we should adjust that to say that it will only add the quote if
> the user hasn't typed anything?
After thinking a bit harder, I realized that the SchemaQuery
infrastructure has no way to deal with the case of the input text not
being a prefix of what we want the output to be, so it can't do something
comparable to Query_for_list_of_timezone_names_quoted_out. Maybe someday
we'll feel like adding that, but COMPLETE_WITH_ENUM_VALUE isn't a
compelling enough reason in current usage. So I just tweaked the comment
a bit.
Pushed that way.
regards, tom lane