On Mon, 28 Feb 2022 at 01:53, Tom Lane <[email protected]> wrote: > Japin Li <[email protected]> writes: >> Why don't support CREATE DATABASE IF NOT EXISTS syntax in PostgreSQL? > > FWIW, I'm generally hostile to CREATE IF NOT EXISTS semantics across > the board, because of its exceedingly squishy semantics: it ensures > that an object by that name exists, but you have exactly no guarantees > about its properties or contents.
Thanks for the explanation! I think it is the database user who should guarantee the properties and contents of a database. CREATE IF NOT EXISTS is just a syntax sugar. -- Regrads, Japin Li. ChengDu WenWu Information Technology Co.,Ltd.
