Re: Relations between operators from pg_amop and classes of operators from pg_opclass

2021-10-19 Thread Tom Lane
Anna Rodionova writes: > For each operator from system catalog pg_amop I need to know - a member of > which class of operators from system catalog pg_opclass it is (in case if > such class of operators exists). > In PostgreSQL versions before v14.0 I was able to get this information from > system

Re: connecting multiple INSERT CTEs to same record?

2021-10-19 Thread Assaf Gordon
On 2021-10-19 1:13 p.m., David G. Johnston wrote: Instead of assigning a unique identifier to student after inserting it into the table, assign the identifier first.  Generally this is done by using “nextval()” Aha! Such elegant solution! Seems obvious in hindsight, but I just couldn't fig

Relations between operators from pg_amop and classes of operators from pg_opclass

2021-10-19 Thread Anna Rodionova
Hi! For each operator from system catalog pg_amop I need to know - a member of which class of operators from system catalog pg_opclass it is (in case if such class of operators exists). In PostgreSQL versions before v14.0 I was able to get this information from system catalog pg_depend. In case

Re: Connection queuing by connection pooling libraries

2021-10-19 Thread Vijaykumar Jain
On Tue, 19 Oct 2021 at 23:20, Vijaykumar Jain < vijaykumarjain.git...@gmail.com> wrote: > > On Tue, 19 Oct 2021 at 23:09, Vijaykumar Jain < > vijaykumarjain.git...@gmail.com> wrote: > >> >> On Tue, 19 Oct 2021 at 22:45, Saurav Sarkar >> wrote: >> >>> Hi All, >>> >>> >>> A basic question on handli

How to rename in-use logical replication publication?

2021-10-19 Thread Kristjan Mustkivi
Hello! Postgres v11.12. Getting "ERROR: publication "new_rep_pub" does not exist" after renaming an existing publication. And the only way to get it working seems to start from scratch. What am I missing? On PUB side: CREATE TABLE rep_test (int_col int PRIMARY KEY, ts_col timestamp); INSERT INTO

Re: connecting multiple INSERT CTEs to same record?

2021-10-19 Thread David G. Johnston
On Tuesday, October 19, 2021, Assaf Gordon wrote: > > Sadly, I can't assume the student name is unique, so I can't "join" on it. > > Instead of assigning a unique identifier to student after inserting it into the table, assign the identifier first. Generally this is done by using “nextval()” exp

connecting multiple INSERT CTEs to same record?

2021-10-19 Thread Assaf Gordon
Hello, I'm looking for a way to insert items to multiple tables (connected with foreign keys) using CTEs. I found few similar questions on stack-overflow and the mailing list, but no solution. Please consider this contrived example: A table of students, and a table of classes they are in: ===

Re: Where is the tsrange() function documented?

2021-10-19 Thread Bryn Llewellyn
> David Johnston wrote: > >> Bryn wrote: >> >> I can't find anything, neither on the page in question here on Range Types >> nor in the doc on the overlaps operator, about the semantics for when a >> duration collapses to an instant. Am I missing this too? > > Same page: > > https://www.postg

Re: Connection queuing by connection pooling libraries

2021-10-19 Thread Vijaykumar Jain
On Tue, 19 Oct 2021 at 23:09, Vijaykumar Jain < vijaykumarjain.git...@gmail.com> wrote: > > On Tue, 19 Oct 2021 at 22:45, Saurav Sarkar > wrote: > >> Hi All, >> >> >> A basic question on handling large number of concurrent requests on DB. >> >> I have a cloud service which can get large of reques

Re: Connection queuing by connection pooling libraries

2021-10-19 Thread Vijaykumar Jain
On Tue, 19 Oct 2021 at 22:45, Saurav Sarkar wrote: > Hi All, > > > A basic question on handling large number of concurrent requests on DB. > > I have a cloud service which can get large of requests which will > obviously trigger the db operations. > > Every db will have some max connection limit

Connection queuing by connection pooling libraries

2021-10-19 Thread Saurav Sarkar
Hi All, A basic question on handling large number of concurrent requests on DB. I have a cloud service which can get large of requests which will obviously trigger the db operations. Every db will have some max connection limit which can get exhausted on large number of requests. I know db con

Re: Force re-compression with lz4

2021-10-19 Thread Mladen Gogala
On 10/18/21 11:01, Adrian Klaver wrote: ot sure how much this applies to the Postgres usage of lz4. As I understand it, this is only used internally for table compression. When using pg_dump compression gzip is used. Unless you pipe plain text output through some other program. This appli

Re: Where is the tsrange() function documented?

2021-10-19 Thread Alban Hertroys
> On 19 Oct 2021, at 7:11, Bryn Llewellyn wrote: > > By the way, I was surprised when I tried this: > > with c as ( > select > '2000-01-01'::timestamp as t1, > '2000-01-10'::timestamp as t2, > '2000-01-20'::timestamp as t3) > select > ( tsrange(t1, t3, '[)') && tsrange(t2, t2,

spannerdb migration to PostgreSQL

2021-10-19 Thread Pawan Sharma
Hello All, Is it possible to migrate the spannerdb database into PostgreSQL? If yes, which tool can we refer to migrate it? -Pawan