Re: Two questions about "pg_constraint"

2022-08-26 Thread Tom Lane
Bryn Llewellyn writes: > My other question was about the "connamespace" column. It seemed to me, > both at first and still now, that this is a clear instance of a > transitive dependency. I think a more productive way to think about it is that it's denormalization for efficiency; specifically to

Re: Two questions about "pg_constraint"

2022-08-26 Thread Christophe Pettus
> On Aug 26, 2022, at 18:47, Bryn Llewellyn wrote: > No, I’m not proposing any code change. Thanks for clarifying.

Re: Two questions about "pg_constraint"

2022-08-26 Thread Bryn Llewellyn
> x...@thebuild.com wrote: > >> b...@yugabyte.com wrote: >> [...] > > I'm still not clear on what you are proposing. Are you proposing a change to > PostgreSQL to remove the "connamespace" column from the "pg_constraint" > table, since it can be derived from other tables? No, I’m not proposing

Re: Two questions about "pg_constraint"

2022-08-26 Thread Christophe Pettus
> On Aug 26, 2022, at 15:33, Bryn Llewellyn wrote: > [...] I'm still not clear on what you are proposing. Are you proposing a change to PostgreSQL to remove the "connamespace" column from the "pg_constraint" table, since it can be derived from other tables?

Re: Two questions about "pg_constraint"

2022-08-26 Thread Bryn Llewellyn
> x...@thebuild.com wrote: > >> b...@yugabyte.com wrote: >> [...] > > I've read this a few times, and I am having trouble understanding what > behavior you were expecting out of PostgreSQL, and what behavior you received > that you didn't think was correct. If it is "pg_constraint has a column

Re: Restriction on table partition expressions

2022-08-26 Thread Ron
It certainly does make sense to have global indices on partitioned tables.  Rdd/VMS had them 20+ years ago, and they are (I still have two production systems using Rdb on OpenVMS) darned useful. Did it require dropping the index before dropping a partition? Absolutely!!  But *of course* /every

Re: How to select based on the condition of a column exists

2022-08-26 Thread David G. Johnston
On Fri, Aug 26, 2022 at 7:01 AM Shaozhong SHI wrote: > The following does not work. > select count(test) from table where exists (select test from table) > > > How to select based on the condition of a column exists? It column test > is not exists, a message need to be returned. > > You have t

How to select based on the condition of a column exists

2022-08-26 Thread Shaozhong SHI
The following does not work. select count(test) from table where exists (select test from table) How to select based on the condition of a column exists? It column test is not exists, a message need to be returned. Regards, David

RE: Unable to start replica after failover

2022-08-26 Thread Lahnov, Igor
I can't answer your question. What do you think, the recovery from the archive should work in this case? 1. the partial file should not be restored at all cases 2. the partial file should recover as a partial and replace the local partial 3. recovery command, should return a conflict - file alread

Re: Restriction on table partition expressions

2022-08-26 Thread James Vanns
Thanks for that, David. It makes sense and no, it certainly wouldn't do to have a global index across all the partitions! It sounds like the key thing that needs highlighting is if the result of an expression (function call in this case) cannot guarantee the uniqueness of the value across all parti