Re: the difference between psql , createdb, dropuser - Mailing list pgsql-admin

From Peter Eisentraut
Subject Re: the difference between psql , createdb, dropuser
Date
Msg-id 7b4ed28f-961d-94da-bf28-800011ce8e5d@2ndquadrant.com
Whole thread Raw
In response to Re: the difference between psql , createdb, dropuser  (Jeff Janes <jeff.janes@gmail.com>)
Responses Re: the difference between psql , createdb, dropuser  (mallikarjun t <mallit333@gmail.com>)
List pgsql-admin
On 2019-10-28 01:01, Jeff Janes wrote:
> On Sun, Oct 27, 2019 at 4:23 PM Setve <setve@protonmail.com 
> <mailto:setve@protonmail.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_")

Also, in the distant past, there was no CREATE USER command and the 
createuser program inserted directly into pg_shadow.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-admin by date:

Previous
From: Jeff Janes
Date:
Subject: Re: the difference between psql , createdb, dropuser
Next
From: "Michelly SILVA S."
Date:
Subject: please unscbscribe