From: | Shruthi Gowda <gowdashru(at)gmail(dot)com> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Erik Rijkers <er(at)xs4all(dot)nl>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> |
Subject: | Re: remaining sql/json patches |
Date: | 2024-03-11 14:55:47 |
Message-ID: | CAASxf_MW4RBUYuS3ybbJYH9U7LQ5cjT699naiG+xKX8g=7Ut2g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
I was experimenting with the v42 patches, and I tried testing without
providing the path explicitly. There is one difference between the two test
cases that I have highlighted in blue.
The full_name column is empty in the second test case result. Let me know
if this is an issue or expected behaviour.
*CASE 1:*
-----------
SELECT * FROM JSON_TABLE(jsonb '{
"id" : 901,
"age" : 30,
"*full_name*" : "KATE DANIEL"}',
'$'
COLUMNS(
FULL_NAME varchar(20),
ID int,
AGE int
)
) as t;
*RESULT:*
full_name | id | age
-------------+-----+-----
KATE DANIEL | 901 | 30
(1 row)
*CASE 2:*
------------------
SELECT * FROM JSON_TABLE(jsonb '{
"id" : 901,
"age" : 30,
"*FULL_NAME*" : "KATE DANIEL"}',
'$'
COLUMNS(
FULL_NAME varchar(20),
ID int,
AGE int
)
) as t;
*RESULT:*
full_name | id | age
-----------+-----+-----
| 901 | 30
(1 row)
Thanks & Regards,
Shruthi K C
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2024-03-11 15:34:31 | Re: remaining sql/json patches |
Previous Message | Heikki Linnakangas | 2024-03-11 14:44:32 | Disconnect if socket cannot be put into non-blocking mode |