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
This is a question on supported functionality that I don't see address explicitly in the docs.
When I create a table in postgres, it generates a type with the same name, which I can then use in a function. E.g., table name = "tracking" so I can write a function like this:
CREATE OR REPLACE FUNCTION platform.public.tracking_insert (items tracking[]) RETURNS TABLE(key varchar, status varchar)
AS $$ Blah Blah $$ LANGUAGE SQL;
Should I expect that to be resolvable using DataTypeName on NpgsqlParameter like so?:
new NpgsqlParameter<List<MachineTestTracking>>() { TypedValue = _items, DataTypeName = "tracking"}
Further technical details
Npgsql version: 6.0.5
PostgreSQL version: 12.11
Thanks for the quick look!
The text was updated successfully, but these errors were encountered:
Yes, that's possible - but you have to opt into Npgsql loading the composite type definitions for these tables by setting Load Table Composites=true in the connection strings (see docs). It's true that it would be good to mention this on the enums & composites page.
This is a question on supported functionality that I don't see address explicitly in the docs.
When I create a table in postgres, it generates a type with the same name, which I can then use in a function. E.g., table name = "tracking" so I can write a function like this:
Should I expect that to be resolvable using
DataTypeName
onNpgsqlParameter
like so?:Further technical details
Npgsql version: 6.0.5
PostgreSQL version: 12.11
Thanks for the quick look!
The text was updated successfully, but these errors were encountered: