Re: Foreign key joins revisited

2022-01-01 Thread Joel Jacobson
On Wed, Dec 29, 2021, at 16:28, Tom Lane wrote: >Peter Eisentraut writes: >> In the 1990s, there were some SQL drafts that included syntax like >> JOIN ... USING PRIMARY KEY | USING FOREIGN KEY | USING CONSTRAINT ... >> AFAICT, these ideas just faded away because of other priorities, so if >> som

Updatable Views and INSERT INTO ... ON CONFLICT

2022-01-01 Thread Joel Jacobson
Hi, I note it's not yet possible to INSERT INTO an Updatable View using the ON CONFLICT feature. One imaginable pattern is when a user wants to refactor by renaming a table, but for some reason cannot refactor some specific application and want to allow it to continue to use the table's old name

Re: Collecting statistics about contents of JSONB columns

2022-01-01 Thread Zhihong Yu
On Fri, Dec 31, 2021 at 2:07 PM Tomas Vondra wrote: > Hi, > > One of the complaints I sometimes hear from users and customers using > Postgres to store JSON documents (as JSONB type, of course) is that the > selectivity estimates are often pretty poor. > > Currently we only really have MCV and hi

Re: Probable memory leak with ECPG and AIX

2022-01-01 Thread Tom Lane
Noah Misch writes: > I get the same results. The leak arises because AIX freelocale() doesn't free > all memory allocated in newlocale(). The following program uses trivial > memory on GNU/Linux, but it leaks like you're seeing on AIX: Bleah. > If you have access to file an AIX bug, I recommen

Re: using extended statistics to improve join estimates

2022-01-01 Thread Tomas Vondra
Hi, Here's an updated patch, rebased and fixing a couple typos reported by Justin Pryzby directly. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL CompanyFrom 15d0fa5b565d9ae8b4f333c1d54745397964110d Mon Sep 17 00:00:00 2001 From: Tomas Vondra Date

Re: Collecting statistics about contents of JSONB columns

2022-01-01 Thread Zhihong Yu
On Sat, Jan 1, 2022 at 7:33 AM Zhihong Yu wrote: > > > On Fri, Dec 31, 2021 at 2:07 PM Tomas Vondra < > tomas.von...@enterprisedb.com> wrote: > >> Hi, >> >> One of the complaints I sometimes hear from users and customers using >> Postgres to store JSON documents (as JSONB type, of course) is that

Re: Probable memory leak with ECPG and AIX

2022-01-01 Thread Noah Misch
On Sat, Jan 01, 2022 at 11:35:02AM -0500, Tom Lane wrote: > Noah Misch writes: > > I get the same results. The leak arises because AIX freelocale() doesn't > > free > > all memory allocated in newlocale(). The following program uses trivial > > memory on GNU/Linux, but it leaks like you're seei