Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Views referencing JSON fields in PostgreSQL JSON(B) columns don't show values for them #263

Open
2 tasks done
curio77 opened this issue Sep 17, 2024 · 0 comments
Open
2 tasks done

Comments

@curio77
Copy link

curio77 commented Sep 17, 2024

What happens?

When I execute a SELECT statement on a PostgreSQL table with a JSONB-type column that includes an output column for a field in that column (extracted via a JSONPath expression), that column yields data as expected. If I create a view for the same statement, the column remains empty.

To Reproduce

SELECT id, json_col->'$.some_field' some_field FROM my_psql_table;
-- result contains values in some_field column ✓
CREATE VIEW my_view AS SELECT id, json_col->'$.some_field' some_field FROM my_psql_table;
FROM my_view;
-- result DOES NOT contain values in some_field column 

OS:

Linux

PostgreSQL Version:

16.4

DuckDB Version:

1.1.0

DuckDB Client:

CLI

Full Name:

Marco Götze

Affiliation:

(none)

Have you tried this on the latest main branch?

  • I agree

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • I agree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant