Re: PostgreSQL pollutes the file system

From: Joe Conway <mail(at)joeconway(dot)com>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Christoph Berg <myon(at)debian(dot)org>
Cc: 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 19:32:57
Message-ID: 48e5efaf-7ea2-ed70-a803-949bbfec8f6b@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-pkg-debian

On 3/29/19 3:01 PM, Pavel Stehule wrote:
> But psql has safe escaping via :"xxx" notation. So some like
>
> psql -c 'create role :"role"' -v role='my role' ...
>
> But what I know the psql variables are not evaluated for -c query

You can do this:
echo "create role :\"role\"" | psql -v role='my role'
CREATE ROLE

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

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

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 Christoph Berg 2019-03-29 19:35:26 Re: Enable data checksums by default
Previous Message Alvaro Herrera 2019-03-29 19:28:37 Re: monitoring CREATE INDEX [CONCURRENTLY]

Browse pgsql-pkg-debian by date

  From Date Subject
Next Message Christoph Berg 2019-03-29 19:38:54 Re: PostgreSQL pollutes the file system
Previous Message Pavel Stehule 2019-03-29 19:01:30 Re: PostgreSQL pollutes the file system