You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When not using * (A_Star) and itemizing columns, functions fail to generate.
Relevant log output
sqlc generate failed.
# package db
query.sql:15:8: column "id" does not exist
Database schema
createtableblog (
id serialprimary key,
name textnot null
);
createfunctiontest_select_blog(in p_id int)
returns table (id int, name text) AS $$
BEGIN RETURN QUERY
select id, name from blog where id = p_id;
END;
$$ language plpgsql;
SQL queries
-- name: TestFuncSelectBlog :manyselect id, name from test_select_blog($1);
Is there any workaround for this? The best I can think of is to create a fake table that matches the composite table declaration and use setof <table name> instead, but this is far from ideal.
* test: Add case for #2132
* test: Add case for #2152
* test: Mark case for #2152
* test: Add case for #2187
* test: Add case for #2226
* test: Add case for #2364
* test: Add case for #2386
* test: Add case for #2538
* test: Add case for #2644
* test: Add case for #2731
Version
1.18.0
What happened?
When not using * (A_Star) and itemizing columns, functions fail to generate.
Relevant log output
Database schema
SQL queries
Configuration
No response
Playground URL
https://play.sqlc.dev/p/122897d98d937d01051777c6ab253ccb16e5c20d513c03c4e1049bf36349f4f5
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: