Skip to content

Composites -- Built-in postgres table types #250

@DanSantimore

Description

@DanSantimore

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions