Skip to content

How do composite custom types look like in PostgREST? #1990

Answered by wolfgangwalther
dreinon asked this question in Q&A
Discussion options

You must be logged in to vote

I would like to know how user-defined composite custom types look like in a select query

Have a look at this old thread, there's an example: #837 (comment)

(Ignore the whole bug thing - it's working as expected)

and what's the format I have to follow to do an insert in a table a column of which is a composite type.

See #837 (comment). It's a bit older, but still valid. You can either make it a string according to postgresql text->composite type conversion or make it an object, which will be parsed into the composite type.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dreinon
Comment options

Answer selected by dreinon
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