From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | Julien Rouhaud <rjuju123(at)gmail(dot)com> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Database-level collation version tracking |
Date: | 2022-02-09 16:25:08 |
Message-ID: | 202202091625.6tcu7tmtvase@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2022-Feb-08, Julien Rouhaud wrote:
> On Tue, Feb 08, 2022 at 12:14:02PM +0100, Peter Eisentraut wrote:
> > I don't think you can run ALTER DATABASE from the regression test scripts,
> > since the database name is not fixed. You'd have to paste the command
> > together using psql tricks or something. I guess it could be done, but
> > maybe there is a better solution. We could put it into the createdb test
> > suite, or write a new TAP test suite somewhere. There is no good precedent
> > for this.
>
> I was thinking using a simple DO command, as there are already some other usage
> for that for non deterministic things (like TOAST tables). If it's too
> problematic I'm fine with not having tests for that for now.
You can do this:
select current_database() as datname \gset
alter database :"datname" owner to foo;
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
From | Date | Subject | |
---|---|---|---|
Next Message | walther | 2022-02-09 16:40:01 | Re: [PATCH] Add reloption for views to enable RLS |
Previous Message | Robert Haas | 2022-02-09 16:21:55 | Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints |