Re: PostgreSQL pollutes the file system - Mailing list pgsql-hackers

From Andreas Karlsson
Subject Re: PostgreSQL pollutes the file system
Date
Msg-id fdbcadf7-9edd-b20d-9987-4e7d21d23b2d@proxel.se
Whole thread Raw
In response to Re: PostgreSQL pollutes the file system  (Chris Travers <chris.travers@adjust.com>)
Responses Re: PostgreSQL pollutes the file system
List pgsql-hackers
On 3/21/19 7:07 AM, Chris Travers wrote:
> 1.  createuser/dropuser are things that I don't consider good ways of 
> creating users anyway.  I think we should just consider removing these 
> binaries.  The SQL queries are better, more functional, and can be 
> rolled back as a part of a larger transaction.

Those binaries are pretty convenient to use in scripts since they handle 
SQL escaping for you, but probably not convenient enough that we would 
have added createuser today.

Compare

createuser "$USER"

vs

echo 'CREATE ROLE :"user" LOGIN' | psql postgres -v "user=$USER"

Andreas


pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Re: Reporting script runtimes in pg_regress
Next
From: Jesper Pedersen
Date:
Subject: Re: speeding up planning with partitions