-
Notifications
You must be signed in to change notification settings - Fork 266
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
Create function - the planned state does not match the desired state after applying #3200
Comments
Hey @NathanBaulch 👋 Thanks for reporting this. I tried to reproduce it locally without success. Here is the schema I used: schema "myapp" {}
table "contact" {
schema = schema.myapp
column "name" {
type = text
}
}
function "get_contact_tsv" {
schema = schema.myapp
lang = PLpgSQL
arg "data" {
type = table.contact
}
return = tsvector
as = <<-SQL
BEGIN
RETURN setweight(to_tsvector(coalesce(data.name, '')), 'A');
END;
SQL
} Just note, I used Could you provide a bit more information to help reproduce this? Are you using a |
If the connection is scoped to a specific schema, we should use InspectSchema to get the inspected realm. That is because PostgreSQL unsets the search_path when inspecting the entire realm, causing us to lose the schema context and get qualified composite types on inspection. Fixed #3200
OK, I was able to reproduce this when I scoped my connection to a specific schema. The issue related to the new lint stage that was added to the declarative workflow ( Thanks for reporting this. |
Something seems to have changed in v0.28.0 - I can no longer apply my schema which contains functions with table row args.
Here's the function definition. I've also tried specifying the arg with
type = table.contact
but no change.I've also tried with v0.28.1 without luck. Where am I going wrong?
The text was updated successfully, but these errors were encountered: