Re: the difference between psql , createdb, dropuser

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Setve <setve(at)protonmail(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: the difference between psql , createdb, dropuser
Date: 2019-10-28 00:01:31
Message-ID: CAMkU=1zhMd9P2urmj_UfdgvMGU2+MKvbWCdkbPfMWvbayhctUg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Sun, Oct 27, 2019 at 4:23 PM Setve <setve(at)protonmail(dot)com> wrote:

> I can execute the create user or create db .etc... command at a PostgreSQL
> interactive terminal so why are these commands "createuser , createdb ,
> dropdb etc.... separately and what is their purpose?
> <https://www.reddit.com/r/PostgreSQL/comments/dnyr0n/i_can_execute_the_create_user_or_create_db_etc/>
>

When scripting the initial set up of a system, it is easier to pass the
name to one of these programs, then to embed them into the middle of an SQL
command properly escaped and quoted. (The names of the programs themselves
are ancient history, if starting from scratch they probably begin with
"pg_")

Cheers,

Jeff

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Peter Eisentraut 2019-10-28 13:04:38 Re: the difference between psql , createdb, dropuser
Previous Message David G. Johnston 2019-10-28 00:00:45 Re: the difference between psql , createdb, dropuser