-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Describe the bug
I'm still a newbie postgresjs user, but it seems to me that the plugin does not take setof into account.
To Reproduce
create table test (
item int not null
)
create function return_nothing()
returns setof test
language sql
as $$
select *
from test
where false;
$$;Result:
const result = await sql`select * from return_nothing();`
// Fixes to
const result = await sql<{ item: number | null }[]>`select * from return_nothing();`For comparison:
const result = await sql`select * from test;`
// Fixes to
const result = await sql<{ item: number }[]>`select * from test;`Expected behavior
const result = await sql<{ item: number }[]>`select * from return_nothing();`Desktop:
- OS: Windows 10
- PostgreSQL version 15.8
- Version 4.0.0
Metadata
Metadata
Assignees
Labels
No labels