Skip to content

Comment on A PostgreSQL Extension that allows you to access any other datasourceparent

Comments

Sorry to beat you at it ;)

We currently have some very rudimentary python to postgres type conversion, but this area still need a lot of improvements.

You should release your code, I'm sure you have a wide range of ideas worth merging into Multicorn !

Actually, the ideal thing to happen would be for PL/Python to somehow become a shared library that provides the typecasting routines, but I'm afraid that's a very big task and difficult to get accepted upstream. It's sad that PL/Python already includes all the code you need to transform Python lists to Postgres arrays, bools to PG bools and so on and every project like this one has to duplicate all that logic.

BTW: in my approach I opted for passing the entire Qual node as a string (using nodeToString) and my plan was to write a Python parser for that format that takes a string and returns a Python object. Not sure how hard that will turn out.

I totally agree with you regarding PL/Python. I may try to ask upstream what they think about it.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.