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
For functions that return records, sqlc will expand to a single column with the same name as the function. This works for PostgreSQL, but results in an interface type due to #2760. Instead, by default, star expansion should create a column for each field on the record.
// CURRENTconsttestFuncSelectBlog=`-- name: TestFuncSelectBlog :manyselect test_select_blog from test_select_blog($1)`// WANTEDconsttestFuncSelectBlog=`-- name: TestFuncSelectBlog :manyselect id, name from test_select_blog($1)`
Relevant log output
No response
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;
Version
1.23.0
What happened?
For functions that return records, sqlc will expand to a single column with the same name as the function. This works for PostgreSQL, but results in an
interface
type due to #2760. Instead, by default, star expansion should create a column for each field on the record.Relevant log output
No response
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/0e0719e69ade689d47546ee075d7f0ae2c9c0fb67f4fd31484841bd70d070197
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
No response
The text was updated successfully, but these errors were encountered: