Json:- Accepting 'integer' value

From: shaurya jain <12345shaurya(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Json:- Accepting 'integer' value
Date: 2021-07-13 18:38:07
Message-ID: CAHHJ3NSF1cLZ2Wika_oQDq54a0hc7DvVh66N0PgjkGqB9UfmAA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Team,

Postgres Version:- 12.7
Issue:- JSON data type column accepting 'integer' value
Priority:-Minor

Below is the table definition and insert statement, which is working in
Postgres however it doesn't work in oracle with check constraint(jj is JSON
strict).

postgres=# \d kp
Table "public.kp"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+--------------------------------
id | integer | | not null | nextval('kp_id_seq'::regclass)
jj | json | | |

postgres=# insert into kp(jj) values('98');
INSERT 0 1

But while we checking the same thing in Oracle it doesn't accept this. Is
it an issue with Postgres data type?

--
Thanks and Regards,
Shaurya Jain
email:- 12345shaurya(at)gmail(dot)com
*Mobile:- +91-8802809405*
LinkedIn:- https://www.linkedin.com/in/shaurya-jain-74353023

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2021-07-13 18:53:45 Re: psycopg2 mail list subscription issues
Previous Message Diego 2021-07-13 17:57:24 Re: psycopg2 mail list subscription issues