Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: David Steele <david(at)pgmasters(dot)net>, Jing Wang <jingwangian(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, "Bossart, Nathan" <bossartn(at)amazon(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Surafel Temesgen <surafel3000(at)gmail(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: [HACKERS] Support to COMMENT ON DATABASE CURRENT_DATABASE
Date: 2018-03-06 16:25:17
Message-ID: 25566.1520353517@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> David Steele wrote:
>> Based on Tom's feedback, and hearing no opinions to the contrary, I have
>> marked this patch Rejected.

> I think I opine contrarywise, but I haven't made time to review the
> status of this in detail. I'm fine with keeping it rejected for now,
> but I reserve the option to revive it in the future.

I'm fine with reviving it if someone can find a way around the new-
reserved-word problem. But that's gonna be a bit hard given that
the patch wants to do

database_name:
ColId
| CURRENT_DATABASE

You might be able to preserve the accessibility of the current_database()
function by making CURRENT_DATABASE into a type_func_name_keyword instead
of a fully-reserved word. But that's ugly (I think you'd need a single-
purpose production for it to be used as a function), and you've still
broken any SQL code using "current_database" as a table or column name.
I'm dubious that the remaining use-case for the feature is worth it.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Arthur Zakirov 2018-03-06 16:27:21 Re: Prefix operator for text and spgist support
Previous Message Robbie Harwood 2018-03-06 16:25:13 Re: Kerberos test suite