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

From Christoph Berg
Subject Re: PostgreSQL pollutes the file system
Date
Msg-id 20190329194330.GD19154@msg.df7cb.de
Whole thread Raw
In response to Re: PostgreSQL pollutes the file system  (Joe Conway <mail@joeconway.com>)
Responses Re: PostgreSQL pollutes the file system
List pgsql-hackers
Re: Joe Conway 2019-03-29 <48e5efaf-7ea2-ed70-a803-949bbfec8f6b@joeconway.com>
> echo "\password :\"role\"" | psql -v role='my role'
> Enter new password:
> Enter it again:
> 
> That said, this is kind of off the topic of this thread.

It is on-topic because the reason we can't just tell people to replace
  createuser $foo
with
  psql -c "create user $foo"
is because $foo might need escaping.

IMHO if we find an way to do that which is acceptable for sh scripts,
the createuser/... commands could go.

> I like Tom's last suggestion of:
> 
>   pg_util <command> <options>
> 
> Of course that does not lend itself to symlinking for backward
> compatibility, does it? If there is a way I am not familiar with it.

We could symlink createuser -> pg_util. It is pretty common for
commands to act differently based on the name the were invoked as.

> I guess the alternative would be an alias, but can packages install an
> alias? Or something else I am not thinking about?

Aliases won't work for non-interactive shell scripts.

Christoph



pgsql-hackers by date:

Previous
From: Chapman Flack
Date:
Subject: Re: PostgreSQL pollutes the file system
Next
From: Robert Haas
Date:
Subject: Re: New vacuum option to do only freezing