Comments (6)
Observations
PostgreSQL supports subscript JSON access only for JSONB:
-- Postgres 16
SELECT js['x'] FROM t_json;
--ERROR: cannot subscript type json because it does not support subscripting (SQLSTATE 42804)
SELECT js['x'] FROM t_jsonb;
-- works
from crate.
This did not work for me on the latest master, what version did you use @proddata ?
SELECT js['x'] FROM t_jsonb;
-- works
from crate.
On top of the issue described, rewriting where js['x'] > 1
to where cast(js ->> 'x' as int) > 1
is another issue.
from crate.
This did not work for me on the latest master, what version did you use @proddata ?
In PostgreSQL 16 ;)
from crate.
I think there is a workaround, could you try subscript_obj(js, 'x')
?
from crate.
I think there is a workaround, could you try subscript_obj(js, 'x')?
also leads to "js['x']"
same as "js"['x']
from crate.
Related Issues (20)
- Allow FDW user mapping against roles HOT 3
- Allow the use of EXPLAIN ANALYZE on queries with scalar subselects
- Ensure own password is also hidden when querying `information_schema.user_mapping_options` HOT 2
- SQLParseException on query with subqueries with latest nightly HOT 4
- FDW - Cannot read JSONB directly from PostgreSQL Server HOT 2
- Expand `OBJECT`s during view creation to include subfields in metadata HOT 4
- ClassCastException on function with RETURNS OBJECT HOT 2
- Support `ALTER SERVER` to change connection url
- Support PUBLIC user mapping for FDW HOT 1
- Unexpected result when using `PG_GET_PARTKEYDEF` HOT 1
- Unexpected result when using `DEFAULT` during creating table HOT 1
- Regression on correlated subqueries HOT 2
- Can't join foreign table with a local table in a multi-node cluster HOT 1
- INSERT INTO much slower than separate SELECT and INSERT HOT 4
- Ignored objects in foreign tables should be fetched as a whole
- Support sas_token for Azure Snapshot repository
- Unexpected result when using `FORMAT_TYPE` HOT 1
- Unexpected result when querying with boolean comparisons HOT 1
- Simplify join condition by optimizing the expression
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crate.