Comments (4)
@dbussink what do you think?
from do.
Right now it's not possible, because we need postgres.h for mapping error code to the appropriate exceptions. At the time I wrote that I search for another way to do that, but the only way was to use the postgres.h header for it.
@luislavena Do you know of other ways to get the Postgres error codes with just using the libpq interface?
from do.
from utils/elog.h
56 /* macros for representing SQLSTATE strings compactly */
57 #define PGSIXBIT(ch) (((ch) - '0') & 0x3F)
58 #define PGUNSIXBIT(val) (((val) & 0x3F) + '0')
59
60 #define MAKE_SQLSTATE(ch1,ch2,ch3,ch4,ch5) \
61 (PGSIXBIT(ch1) + (PGSIXBIT(ch2) << 6) + (PGSIXBIT(ch3) << 12) + \
62 (PGSIXBIT(ch4) << 18) + (PGSIXBIT(ch5) << 24))
from do.
If I look at the packaging of libpq-dev for example in Debian:
http://packages.debian.org/squeeze/amd64/libpq-dev/filelist
Here the postgres.h header and some additional ones that we use are also part of this list. I guess this is what usually ends up being the list that people require for writing a client. Therefore closing this issue, since I don't see DO being able to change this anytime soon.
from do.
Related Issues (20)
- Usage of .my.cnf file in do_mysql HOT 1
- Fixnum deprecated after ruby 2.4
- postgres - precision lost when casting on double precision HOT 2
- do_postgres won't install with postgresql-9.3 on Ubuntu 13.10 HOT 15
- do_postgres relies on server header files HOT 2
- do_mysql should not automatically coerce tinyint(1) values into bools
- Installing do_postgres fails on OSX maverick and brew install postgresql
- do_postgres does work with rubyinstaller version 2.1 HOT 3
- do_mysql and do_postgres don't run in ruby 2.2 HOT 6
- do_sqlite3:0.10.14 - LoadError: "cannot load such file -- do_sqlite3/2.1/do_sqlite3" HOT 1
- do_postgres appears to be truncating timestamp smaller than seconds HOT 1
- Time is losing timezone from DB and assuming local time zone
- Case sensitive error message test
- do_jdbc not compatible with jruby-9000 HOT 1
- Sqlite3 doesn't handle sub-second time in jruby
- Does not work with MySQL 5.7 HOT 14
- UTF-8-MB4 issues HOT 1
- SQLite DB Connection String ASCII characters
- Configurable pooling
- [do_postgres] Returning ID when bigint fails at `atoi` HOT 5
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 do.