Skip to content
Discussion options

You must be logged in to vote

Oh, this is interesting. We have two implementations for functions on table types: Computed fields and Computed relationships. According to your examples you want the latter so the correct syntax for that is: /products?select=items(*), but this only works when the items function returns a table not a composite type for now ( see #3096).

So how is the api.item_rowtype defined, is it a TABLE or a TYPE? To check this, execute:

select relkind from pg_class where relname = 'item_rowtype';

If it's c then it's a composite type, you must use a table to make this work. If it's r then it's a table and it should work, perhaps you need to reload the schema cache.

Whas complicates this a little I did…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gaslitbytech
Comment options

@gaslitbytech
Comment options

Answer selected by gaslitbytech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants