Re: Add more tab=completion rules for DROP PROPERTY GRAPH - Mailing list pgsql-hackers

From Chao Li
Subject Re: Add more tab=completion rules for DROP PROPERTY GRAPH
Date
Msg-id 199C8C0B-0D1D-477A-8309-D621B2B86A76@gmail.com
Whole thread
In response to Add more tab=completion rules for DROP PROPERTY GRAPH  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers

> On Aug 4, 2026, at 13:11, Peter Smith <smithpb2250@gmail.com> 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
> <v1-0001-tab-complete-for-DROP-PROPERTY-GRAPH.patch>

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

```

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







pgsql-hackers by date:

Previous
From: Ayush Tiwari
Date:
Subject: Re: Add a pg_wal_preallocate() SQL function to eagerly create future WAL segments
Next
From: Alexander Pyhalov
Date:
Subject: Re: Bug in asynchronous Append