Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?

2022-06-03 Thread Tom Lane
Bryn Llewellyn writes: > I'm going to try to think like this: > The number of possible spellings of the names of keys in a JSON object is > some flavor of infinite. So including this in an object: > "k": null > really is saying something. It says that I do know about "k" and that yet I > have

Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?

2022-06-03 Thread Bryn Llewellyn
> david.g.johns...@gmail.com wrote: > > b...@yugabyte.com wrote: > >> declare >> j1 constant jsonb not null := '{"x": 42, "y": null}'; >> j2 constant jsonb not null := '{"x": 42 }'; >> ... >> (j1->>'y' is null) > > This produces a JSON Null which when asked

Re: '{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?

2022-06-03 Thread David G. Johnston
On Fri, Jun 3, 2022 at 6:41 PM Bryn Llewellyn wrote: > > > > > *declare j1 constant jsonb not null := '{"x": 42, "y": > null}'; j2 constant jsonb not null := '{"x": 42 }';* > > *(j1->>'y' is null) * > This produces a JSON Null which when asked for as a text

'{"x": 42, "y": null}'::jsonb != '{"x": 42}'::jsonb ... Really?

2022-06-03 Thread Bryn Llewellyn
Here’s the minimal testcase: do $body$ declare j1 constant jsonb not null := '{"x": 42, "y": null}'; j2 constant jsonb not null := '{"x": 42 }'; predicate_1 constant boolean not null := (j1->>'y' is null) AND (j2->>'y' is null); predicate_2 constant

Re: Why password authentication failed for user "postgres"?

2022-06-03 Thread Reid Thompson
On Sat, 2022-06-04 at 06:32 +0800, BeginnerC wrote: > Hello everyone, > I am a newbie to the postgres,when I use the psql to connect to the > postgres,a error message printed: > These command list like this: > > psql -U postgres > Password for user postgres:postgres > postgreSQL: password

Why password authentication failed for user "postgres"?

2022-06-03 Thread BeginnerC
Hello everyone, I am a newbie to the postgres,when I use the psql to connect to the postgres,a error message printed: These command list like this: psql -U postgres Password for user postgres:postgres *postgreSQL: password authentication failed for user "postgres"* * * How to solve this

Re: Logically replicated table has no visible rows

2022-06-03 Thread Jeff Ross
On 5/31/22 11:46 AM, Jeff Ross wrote: Hello, We have a logically replicated table on RDS that is 39 G in size on both the publisher (10.21) and the subscriber (12.8). The replication slots on the publisher are all marked as active and the lsns are current so no lag. Other tables on the

Re: Max sane value for join_collapse_limit?

2022-06-03 Thread Philip Semanchuk
> On Jun 3, 2022, at 4:19 AM, Andreas Joseph Krogh wrote: > > Hi, I have set join_collapse_limit = 12 in production, but I'm thinking about > raising it to 16. > On modern HW is there a “sane maximum” for this value? > I can easily spare 10ms for extra planning per query on our workload, is

Re: GIN theory

2022-06-03 Thread jian he
theory/explanation about GIN index: https://github.com/postgres/postgres/blob/master/src/backend/access/gin/README https://postgrespro.com/blog/pgsql/4261647 https://pgpedia.info/g/gin.html On Fri, Jun 3, 2022 at 2:34 PM huangning...@yahoo.com < huangning...@yahoo.com> wrote: > Hi: > > I want

Re: unoptimized nested loops

2022-06-03 Thread Tim Kelly
Thank you to David, Jeff and Tom for your responses. Tom's response has made me rethink my question. I may have provided too much information, in the effort to anticipate suggestions. Let me rephrase: I have two tables, a parent (named "metadata") and a child (named "data"). Each table

GIN theory

2022-06-03 Thread huangning...@yahoo.com
Hi: I want to know the time that create a gin index for a array, or some theory about gin index? Thanks

Max sane value for join_collapse_limit?

2022-06-03 Thread Andreas Joseph Krogh
Hi, I have set join_collapse_limit = 12 in production, but I'm thinking about raising it to 16. On modern HW is there a “sane maximum” for this value? I can easily spare 10ms for extra planning per query on our workload, is 16 too high? Thanks. -- Andreas Joseph Krogh CTO / Partner