Re: PostgreSQL pollutes the file system

From: Joe Conway <mail(at)joeconway(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>
Cc: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>, Andreas Karlsson <andreas(at)proxel(dot)se>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, eldmannen(at)gmail(dot)com, mark(dot)kirkwood(at)catalyst(dot)net(dot)nz, Michael Paquier <michael(at)paquier(dot)xyz>, Chris Travers <chris(dot)travers(at)adjust(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, rjuju123(at)gmail(dot)com, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: PostgreSQL pollutes the file system
Date: 2019-03-29 20:05:29
Message-ID: f579fde8-8266-f2d6-4ba1-91c6046bc2f6@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-pkg-debian

On 3/29/19 3:43 PM, Christoph Berg wrote:
> Re: Joe Conway 2019-03-29 <48e5efaf-7ea2-ed70-a803-949bbfec8f6b(at)joeconway(dot)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 think these commands *were* once (at least some of them) shell scripts
and we went to executable C in order to make them work on Windows, IIRC.

>> 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.

Yeah, I forgot about that. Does that also go for Windows?

Joe

--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2019-03-29 20:07:42 Re: monitoring CREATE INDEX [CONCURRENTLY]
Previous Message Robert Haas 2019-03-29 20:04:46 Re: New vacuum option to do only freezing

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Christoph Berg 2019-03-29 20:30:09 Re: PostgreSQL pollutes the file system
Previous Message Christoph Berg 2019-03-29 19:43:30 Re: PostgreSQL pollutes the file system