Re: Determine server version from psql script - Mailing list pgsql-general

From David G. Johnston
Subject Re: Determine server version from psql script
Date
Msg-id CAKFQuwb6vf1L2O8X_6Qu2VNq9iUhCjbXTc=51702h7yo4dH=8w@mail.gmail.com
Whole thread Raw
In response to Re: Determine server version from psql script  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: Determine server version from psql script
List pgsql-general
On Sunday, March 23, 2025, David G. Johnston <david.g.johnston@gmail.com> wrote:
On Sunday, March 23, 2025, Igor Korot <ikorot01@gmail.com> wrote:

2. Is there a way to do CREATE TRIGGER IF NOT EXIST for the earlier version?

No.  You have to drop the trigger if it does exist and then create the new one.

Well, you can always query the catalogs directly to answer the question “does this trigger exist”.

David J.

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Determine server version from psql script
Next
From: Pavel Stehule
Date:
Subject: Re: Determine server version from psql script