-
Notifications
You must be signed in to change notification settings - Fork 257
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
Feature request: Support for JSONB in postgresql #2936
Comments
The Spin Postgres API doesn't yet support the |
Hi @itowlson, thanks a lot and that would be great. |
"Experimental" here means "we are not sure we have the right interfaces", rather than "we are not sure it works." In practice they have been stable across multiple versions of Spin, and we have retained backward compatibility, so we should really remove that designator! But for example we introduced a new Postgres interface in Spin 3, to allow for date-time types. And those are a minefield which we may not have gotten right on the first go! So in a sense those are experimental. But if we do change them it will be "new interface alongside the existing one," just as Spin 3 continues to support the Spin 2 Postgres interface. The existing interfaces won't break. |
Thanks for clarifying the term as it is in use. To me, as an user of Spin, “experimental” looks like it might mean I shouldn't use it in production. Perhaps it should be called stable for mysql/postgres in general and explain which functions in particular are “experimental”. As a further workaround for jsonb, I have now created a stored procedure and do not need a migration script: CREATE PROCEDURE insert_data(a text)
LANGUAGE SQL
AS $$
INSERT INTO tbl VALUES (jsonb(a));
$$; CALL insert_data("test") |
Hi there,
can you please give me an advice how to store JSONB (binary) values into postgresql?
Table
What I tried
error output:
Error::QueryFailed("Error { kind: ToSql(1), cause: Some(WrongType { postgres: Jsonb, rust: \"alloc::vec::Vec<u8>\" }) }")
also as string does not work
error output:
fail: Error::QueryFailed("Error { kind: ToSql(1), cause: Some(WrongType { postgres: Jsonb, rust: \"alloc::string::String\" }) }")
environment
The text was updated successfully, but these errors were encountered: