Sample Header Ad - 728x90

IF NOT EXISTS - seems to be applied at random in postgres

0 votes
1 answer
113 views
there is a mechanics to CREATE or DROP objects only whether they exist or not. To me it seems that postgres applies this randomly.
CREATE EXTENSION > true
CREATE SCHEMA > true
CREATE DATABASE > false
CREATE ROLE > false
I am aware that you can build something in pl/pgsql or create a function mimicking this behavior, which requires quite extendet skills. For my understanding ... is there any explanation why this is setup in this 'random' manner?
Asked by vrms (269 rep)
Feb 24, 2025, 10:46 AM
Last activity: Feb 24, 2025, 12:16 PM