Re: Improve version detection for online help URL

Поиск
Список
Период
Сортировка
Искать

Re: Improve version detection for online help URL

От:
Peter Eisentraut <peter@eisentraut.org>
Дата:
On 04.06.26 05:19, Japin Li wrote:
> Currently, we are on 19beta1, and I found an invalid URL for an SQL command.
> 
>      postgres=# \h SET SESSION
>      Command:     SET SESSION AUTHORIZATION
>      Description: set the session user identifier and the current user identifier of the current session
>      Syntax:
>      SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name
>      SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT
>      RESET SESSION AUTHORIZATION
>      
>      URL: https://www.postgresql.org/docs/19/sql-set-session-authorization.html

This URL works now.  It probably did not work before there was a 
19-something release out.



Add more tab=completion rules for DROP PROPERTY GRAPH

От:
Peter Smith <smithpb2250@gmail.com>
Дата:
Вложения:
Here's a patch to add another tab-completion rule for DROP PROPERTY GRAPH [1]

The logic is the same as DROP MATERIALIZED VIEW [2] which has a very
similar syntax.

PSA v1.

======
[1] https://www.postgresql.org/docs/19/sql-drop-property-graph.html
[2] https://www.postgresql.org/docs/19/sql-dropmaterializedview.html

Kind Regards,
Peter Smith.
Fujitsu Australia

Re: Add more tab=completion rules for DROP PROPERTY GRAPH

От:
Chao Li <li.evan.chao@gmail.com>
Дата:
Вложения:


> On Aug 4, 2026, at 17:10, Peter Smith  wrote:
> 
> On Tue, Aug 4, 2026 at 6:26 PM Chao Li  wrote:
>> 
>> 
>> 
>>> On Aug 4, 2026, at 13:11, Peter Smith  wrote:
>>> 
>>> Here's a patch to add another tab-completion rule for DROP PROPERTY GRAPH [1]
>>> 
>>> The logic is the same as DROP MATERIALIZED VIEW [2] which has a very
>>> similar syntax.
>>> 
>>> PSA v1.
>>> 
>>> ======
>>> [1] https://www.postgresql.org/docs/19/sql-drop-property-graph.html
>>> [2] https://www.postgresql.org/docs/19/sql-dropmaterializedview.html
>>> 
>>> Kind Regards,
>>> Peter Smith.
>>> Fujitsu Australia
>>> 
>> 
>> I think you also need to handle “IF EXISTS”. With v1, MatchAny considers “IF” as a relation name, thus it suggests "CASCADE  RESTRICT”, and when “IF EXISTS” is given, it doesn’t suggest anything:
>> ```
>> evantest=# drop property graph if
>> CASCADE  RESTRICT
>> evantest=# drop property graph if exists a
>> 
> 
> Yeah, this patch only added CASECADE|RESTRICT in a way that's
> compatible with many of the other DROPS...
> 
> (As mentioned in the original post, I copied the same rules as seen in
> DROP MATERIALIZED VIEW)
> 
> So, what you reported is definitely a problem, but IMO it's a separate
> problem beyond the scope for this little patch.
> 
> There's a lot of existing code which won't behave correctly for your
> IF EXISTS...
> 
> e.g. Try any of these:
> - DROP MATERIALIZED VIEW IF 
> - DROP INDEX IF 
> - DROP ACCESS METHOD IF 
> - DROP EVENT TRIGGER IF 
> etc...

Ah, I’m not aware of that. Looks like CREATE has the same problem. So, I won’t expect this patch to do anything especially.

V1 looks good to me.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/






FAQ