Comments (9)
But when I use 3.3.1 version pgcli, no such problem.
from pgcli.
Thanks for the report. By any chance, could you try to reproduce with the following versions: 3.4.1 and 3.5.0? My guess is that it might work with pgcli 3.4.1, but fail with 3.5.0. The culprit could be the migration from psycopg2 to psycopg3 (a dependency of pgcli), which landed in pgcli 3.5.0. If you can then try to connect directly with pyscopg2 and psycopg3, that would help pinpoint the source of the issue (which could then be reported to the psycopg project itself).
from pgcli.
I use mac brew,it‘s not easy to rollback pgcli version。
from pgcli.
I have do some test,sample code will always show false with psycopy 3.1.18
.
#!/bin/python
import psycopg
if __name__ == '__main__':
with psycopg.connect("dbname=testdb user=test host=192.168.64.5 port=5432") as conn:
with conn.cursor() as cur:
cur.execute('select true')
for record in cur.fetchall():
print(record)
from pgcli.
when I change version to psycopg2, new error rise.
Traceback (most recent call last):
File "/Users/xxx/Developer/psycopytest/testpsycopg.py", line 8, in <module>
for record in cur.fetchall():
psycopg2.InterfaceError: can't parse boolean: '1'
from pgcli.
Newer versions of pgcli switched from psycopg2
to psysopg
(also known as psycopg3
). Those two libraries are not. compatible.
from pgcli.
It's weird, same version with same code, original pgsql display right result, opengauss display wrong result, but opengauss's client gsql
do not have such problem. @j-bennet
from pgcli.
when I change version to psycopg2, new error rise.
Traceback (most recent call last): File "/Users/xxx/Developer/psycopytest/testpsycopg.py", line 8, in <module> for record in cur.fetchall(): psycopg2.InterfaceError: can't parse boolean: '1'
@AndrewDi Psycopg2 dose have this problem. If you use 'B' compatibility database in opengauss, the Boolean values will return 0
or 1
at the protocol layer, the pg driver is not supported. I once fixed this in this issue.
from pgcli.
You do not want to switch to psycopg2
, we switched to psycopg
as of 3.5.0.
from pgcli.
Related Issues (20)
- pgcli 4.0 - ModuleNotFoundError: No module named 'six' HOT 7
- pgcli.magic `conn.session.engine.url` raises AttributeError after breaking change upstream in ipython-sql
- Raised notices are printed backwards HOT 3
- Segfault on MacOs HOT 2
- Doesn't work with Python 3.11/Windows HOT 6
- Tab completion not working in version 4.0.1 on macOS
- pendulum dependency cannot be installed on 32-bit arches HOT 4
- Autocomplete not working for Apache AGE extension function names HOT 1
- `invalid input syntax for type oid: "{oid}"` when running \d on an index HOT 4
- Per-database prompt colours HOT 1
- psycopg.errors.DataCorrupted: missing chunk number 0 for toast value 16386 in pg_toast_2619 HOT 3
- Can not quit pgcli if server has shutdown
- Readme link - this page has moved HOT 1
- Document how to replace pg_isready with pgcli HOT 1
- Add types HOT 2
- error while retoring dump with zstd compreesion. HOT 1
- Unable to use `pgcli service={service}`
- Distribute binary packages when tagging new versions HOT 2
- how to provide password by command line option.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pgcli.