Question regarding postgresql extensions
Hey guys!
I saw that the self-hosted version provides the option to use postgresql as the database for convex. I need to deal with path data from DXF / CAD drawing files in my database, so I was looking at the postGIS extension. Is there a recommended way to have convex interact with postgres extensions that alter the data types that postgres can handle?
10 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
hi! convex tables do not map directly to postgres tables, unfortunately. so I don't think here's a clear relationship between an extensions types and convex types
Hey Jamie! I am here after Theo's video on Chef and Convex + Chef looks amazing!
Could we request for this as a feature, please? Or is this technically never going to be possible with the architecture?
My use case is a recommendation engine. Supabase doesn't really have support for a "graph" plugin like Apache AGE, but they do have a hacky way to achieve it.
Would love for something like this on the Convex side!
hi! Convex inherently, supports graphs, so a good graph API could be written as a Convex component.
This isn’t on our new term road map, but we’re about to open up the component API to everyone, and someone else could take a crack at it and we’d be happy to offer advice and review code.
in terms of, would convex tables ever directly map to postgres tables, unfortunately not. Convex architecture abstracts away, the underlying relational database system for scale And flexibility.
Thanks for the info, Jamie!
Just to follow up on this - would it technically be possible to interact with the custom data types exposed by an extension like postGIS with your component API? What would that look like?
@Jamie sorry to ping you, just wanted to get some clarification on the component spec. If it's possible with components to do what I'm asking it would make convex a no-brainer for my project.
I'm really not sure. I don't know much about postGIS
but we may implement sort of streaming replica stuff built into postgres in the second half of the year so that you can get to reflected tables for SELECTS for OLAP etc
this would be either duckdb or postgres
Yeah I saw that, I'm not sure if it applies to path data - for context I need to be able to store DXF part information as path data using postgis data types, in this case for sheet metal part files.
Would components allow me to write my own way to interact with a postgres database that is being used by convex? I'm sure I can use other workarounds to get things operational, I'm mostly just wondering what sort of capabilities the component API would expose for developers using convex as the backend.
yes, you could use components to create a bridge to a postgres database
but convex (cloud) is not running on a postgres database, and there wouldn't be a way to do it within the same transactional context -- in case that consistency would be important to you