Comments (2)
It works if you set the type explicitly:
ALTER TABLE my_data ADD COLUMN object_id TEXT AS ( data->>'id' );
-- instead of
ALTER TABLE my_data ADD COLUMN object_id AS ( data->>'id' );
from sqlc.
It's not related to generated columns or json. In general ALTER TABLE t1 ADD COLUMN c1;
without type fails.
from sqlc.
Related Issues (20)
- wrong type for params in tuple
- COALESCE doesn't appear to work within a CTE
- SQLite: interface{} instead of time.Time for json extracted queries
- Multiple schemas support
- varchar2 support HOT 1
- copyfrom not respecting `query_parameter_limit` HOT 1
- Add Ruby support HOT 3
- Problem with selecting from functions HOT 2
- How to generate schema automatically from database linked in URL?
- Support joins one to many (is the project still active?)
- Support MariaDB UUID type HOT 2
- Querying Postgres Materialized Views Catalog: relation "pg_matviews" does not exist HOT 1
- Issues with parsing function syntax in MySQL
- Duplicated Query Name even when there is no duplicate. HOT 1
- docker run 1.26.0 but generating v1.25.0 HOT 1
- Composition for paging ?
- Support dynamic queries
- Managed databases with any accessible server
- verify: Use managed databases
- Redundant import of lib/pq when using sqlc.slice() with sqlc.narg() with MySQL HOT 1
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 sqlc.