jwills / buenavista Goto Github PK
View Code? Open in Web Editor NEWA Postgres Proxy Server in Python
License: Apache License 2.0
A Postgres Proxy Server in Python
License: Apache License 2.0
What is the level of Postgres emulation that Buena Vista aims for?
For example, if I do \d
in psql to get list of tables, I get following error:
Catalog Error: Scalar Function with name pg_get_userbyid does not exist!
Did you mean "pg_get_expr"?
LINE 1: ...HEN 'partitioned index' END AS "Type", pg_catalog.PG_GET_USERBYID(c.relowner) ...
That is because the pg_
tables don't exist. DBeaver for example is broken when browsing the database as well, since it relies on them being there:
Would it make sense to add simulation of those tables into Buena Vista or is it out of scope and only the wire protocol is the point?
When I try connnect to Power BI, I haved to provide username, password, then I gave it admin:admin, but Power Bi refused with this message: Unable to connect. We encounted an error while trying to connect. Detailed: "PostgresSQL: No password has been provided but the backend requires one (in SASL/SCRAM-SHA-256)"
A container (see Dockerfile below) with official python 3.11.1 and buenavista
installed complains with this message when started:
Using in-memory DuckDB database
Traceback (most recent call last):
File "/src/buenavista/examples/duckdb_server.py", line 202, in <module>
db.execute(
duckdb.CatalogException: Catalog Error: Cannot drop entry "pg_database" because it is an internal system entry
This issue can be replicated with this Dockerfile and running docker build -t buenavista . && docker run --rm buenavista
:
# syntax=docker/dockerfile:1.4
FROM docker.io/python:3.11.1
ENV TZ=Europe/Stockholm
ENV DEBIAN_FRONTEND=noninteractive
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update -y && apt-get install -y --no-install-recommends \
git
WORKDIR /src
# these seem to be requirements
RUN pip install duckdb pyarrow
RUN git clone --depth=1 https://github.com/jwills/buenavista.git
WORKDIR /src/buenavista
CMD PYTHONPATH=. python3 examples/duckdb_server.py
Would be great to see this published to PyPi for ease of use!
I was having an issue with running the buenavista docker image because the "buneavista.backend" module did not exist. Looks like this is because of recent a commit 8d78552 renaming the backend module to backends.
After I changed the CMD in the docker file from python -m buenavista.backend.duckdb
to python -m buenavista.backends.duckdb
everything worked.
I will open up a PR with the fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.