AW: how to merge two postgresql server instances into one

2021-10-07 Thread Marco Lechner
Hi Adrian, does this clearify the mission: Recent: PostgreSQL 11: - Db1_foo - Db2_bar - postgres - template1 PostgreSQL 12: - Db3_zii - Db4_gee - postgres - template1 Result after Upgrade: PostgreSQL 14: - Db1_foo - Db2_bar - Db3_zii - Db4_gee - postgres (not from PG11/

Re: AW: how to merge two postgresql server instances into one

2021-10-07 Thread Heikki Pernu
I would suggest you setup a new virtual server, LXC container or docker instance with the new version of pg14, pg_dump the old databases(one by one) and then import them to the new ones. That way, you do not have to mess with multiple installations of Postgres and can use minimal extra resour

Re: Misplaced double quotes in error message

2021-10-07 Thread Adrian Klaver
On 10/6/21 11:17 PM, Thomas Kellerer wrote: Hello, consider the following table, query and error message: create table t ( "someColumn" int ); select t.someColumn from t; ERROR: column t.somecolumn does not exist Hint: Perhaps you meant to referenc

Re: Misplaced double quotes in error message

2021-10-07 Thread Sunil Thakur
It means Error thrown by Postgres: Hint: Perhaps you meant to reference the column "t.someColumn". must be Hint: Perhaps you meant to reference the column t."someColumn". *Thanks and Regards,Sunil M. K. Thakur* *

Re: AW: how to merge two postgresql server instances into one

2021-10-07 Thread Adrian Klaver
On 10/7/21 1:19 AM, Marco Lechner wrote: Hi Adrian, does this clearify the mission: Recent: PostgreSQL 11: - Db1_foo - Db2_bar - postgres - template1 PostgreSQL 12: - Db3_zii - Db4_gee - postgres - template1 Result after Upgrade: PostgreSQL 14: - Db1_foo - Db2_bar

Re: Misplaced double quotes in error message

2021-10-07 Thread Tom Lane
Adrian Klaver writes: > On 10/6/21 11:17 PM, Thomas Kellerer wrote: >> consider the following table, query and error message: >> ERROR: column t.somecolumn does not exist >> Hint: Perhaps you meant to reference the column "t.someColumn". >> >> For someone proficient in SQL it's pretty clear what

Re: DELETE ... USING LATERAL

2021-10-07 Thread Nikhil Benesch
On Mon, Oct 4, 2021 at 3:21 PM Tom Lane wrote: > Not sure what to tell you about the state of the idea that the > target table could be re-specified in FROM/USING. I'm hesitant > to close the door on it permanently, because people do periodically > wish to be able to left-join the target to somet

Re: Timestamp with vs without time zone.

2021-10-07 Thread Bruce Momjian
On Tue, Sep 21, 2021 at 05:49:21PM -0400, Tom Lane wrote: > I think there is plenty of application for timestamps that actually > include (civil) time zones. Calendaring, for example. If I make an > appointment to see a friend at 2PM some months from now, it's > understood that that's in the loca

Regression in PL/PGSQL code using RETURN QUERY with Postgres 14

2021-10-07 Thread Gavin Roy
Hi All, My team was testing against Postgres 14 to ensure we could cleanly upgrade and we ran across a regression in our PL/PGSQL code related to the updates to RETURN QUERY. Our code which works in previous versions of Postgres uses UPDATE RETURNING and INSERT RETURNING in combination with RETUR

Re: Currently running queries with actual arguments?

2021-10-07 Thread Bruce Momjian
On Thu, Sep 23, 2021 at 08:51:49PM +0400, rihad wrote: > On 9/23/21 7:58 PM, Garfield Lewis wrote: > > The way I normally get this info is by setting the following: > > > > log_statement = 'all' > > > > then the arguments will be printed in the postgres.log file. There could be > > some other wa

Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14

2021-10-07 Thread Adrian Klaver
On 10/7/21 11:38 AM, Gavin Roy wrote: Hi All, My team was testing against Postgres 14 to ensure we could cleanly upgrade and we ran across a regression in our PL/PGSQL code related to the updates to RETURN QUERY. Our code which works in previous versions of Postgres uses UPDATE RETURNING an

Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14

2021-10-07 Thread Tom Lane
Gavin Roy writes: > Our code which works in previous versions of Postgres uses UPDATE RETURNING > and INSERT RETURNING in combination with RETURN QUERY. It appears that in > the parallelism updates, RETURN QUERY now only accepts SELECT queries. Yeah, that's a mistake, previously reported and fixe

Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14

2021-10-07 Thread Gavin Roy
On Thu, Oct 7, 2021 at 2:54 PM Adrian Klaver wrote: > On 10/7/21 11:38 AM, Gavin Roy wrote: > > Hi All, > > > > My team was testing against Postgres 14 to ensure we could cleanly > > upgrade and we ran across a regression in our PL/PGSQL code related to > > the updates to RETURN QUERY. > > > > Ou

Re: Regression in PL/PGSQL code using RETURN QUERY with Postgres 14

2021-10-07 Thread Gavin Roy
Thanks so much Tom! Regards, Gavin On Thu, Oct 7, 2021 at 3:05 PM Tom Lane wrote: > Gavin Roy writes: > > Our code which works in previous versions of Postgres uses UPDATE > RETURNING > > and INSERT RETURNING in combination with RETURN QUERY. It appears that in > > the parallelism updates, RE

Re: Misplaced double quotes in error message

2021-10-07 Thread Peter J. Holzer
On 2021-10-07 10:55:09 -0400, Tom Lane wrote: > Yeah. This is not as simple as it looks, because per our message > style guidelines, double quotes are used to set off inserted text, > independently of whether it is a SQL identifier or something else. > (There is a style violation in this message: