Questions tagged [libpqxx]

Libpqxx is a C++ client API for PostgreSQL, the enterprise-strength open-source database software.

Libpqxx is a C++ client API for PostgreSQL, the enterprise-strength open-source database software.

homepage: http://pqxx.org/development/libpqxx/

Other PostgreSQL C++ clients: https://wiki.postgresql.org/wiki/Client_Libraries#C.2B.2B

235 questions
0
votes
1 answer

postgres/libpqxx: Refuses authentication via password

I'm using two tools here in university, wich both work with the same postgres database. The one written in Java uses the jdbc-driver and that works just fine. The second one written in C++ has some difficulties. It gives me following error Ident…
Daniello
  • 175
  • 14
0
votes
1 answer

trying to connect to postgresql via c++ program

Background I'm running linux... and I'm trying to write a basic little c++ program that connects to a postgresql database. I'm trying to follow this article http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm Problem I've been able to…
dot
  • 14,928
  • 41
  • 110
  • 218
0
votes
1 answer

fatal error: 'libpq++' file not found

I would love to use libpq++ library in my C++ project but I am unable to get it working. So far, I have installed libpqxx-dev libpqxx-4.0 packages on my Ubuntu 14.04 and provided -llibpq++ to clang++. However, no matter what I do, I still get…
Jendas
  • 3,359
  • 3
  • 27
  • 55
0
votes
0 answers

Cannot compile my PHP-CPP extension with libpqxx on 64-bit system

I migrated to 64-bit Ubuntu, and now I can't compile my extension. On 32-bit it works just fine. Someone know what is a problem? Thank you. I've got this error report. $ make g++ -shared -o extension.so main.o -lphpcpp -lpqxx -lpq…
Aldos
  • 193
  • 2
  • 12
0
votes
1 answer

How to call overloaded remote procedure from pqxx

How to call overloaded remote procedure from pqxx? Procedures eg: CREATE OR REPLACE FUNCTION foo(str text) RETURNS text AS $$ BEGIN RETURN 'text'; END; $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION foo(num integer) RETURNS text AS…
FrozenHeart
  • 19,844
  • 33
  • 126
  • 242
0
votes
1 answer

C++ postgis prepared statement failing, invalid geometry

I'm using libpqxx and a prepared statements, when I try to insert programmatically it fails with an error "Invalid geometry", but I can do the same insert via sql prompt.. Am I missing something? I tried to escape the ' in the prepare statement call…
Crushing
  • 487
  • 1
  • 9
  • 24
0
votes
0 answers

undefined reference to `pqxx::result::begin() const'

I am trying to compile a simple piece of code which selects multiple rows from database using libpqxx library on centos 6.3. #include using namespace std; using namespace pqxx; int main(int argc, char* argv[]) { char * sql; …
0
votes
2 answers

pqxx byteA and binaryString weird data reading

im having some troubles with a PostGreSQL database and some cyphered data. Im usin a blowfish algorithm to encrypt strings, obtaining binray data in return. This binary can contain \0 and some other scape sequences. I store the data this way:…
Xeyos
  • 33
  • 1
  • 6
0
votes
0 answers

How to update and set unit_id to be NULL, unit id is foreign key from unit table

How to update and set unit_id to be NULL, unit id is foreign key and I need to set to be NULL CREATE TABLE troops ( id serial NOT NULL, unit_id integer, type integer NOT NULL, level integer NOT NULL, CONSTRAINT troops_pkey PRIMARY KEY…
PaolaJ.
  • 10,872
  • 22
  • 73
  • 111
0
votes
1 answer

libpqxx transaction serialization & consequences

For my implementation, a particular write must be done in bulk and without the chance of another interfering. I have been told that two competing transactions in this way will lead to the first one blocking the second, and the second may or may not…
user1382306
0
votes
1 answer

Segmentation fault when dealing with connection object

I have bunch of methods: bool PGConnection::connect() { try { conn = new pqxx::connection( "user=temp " "host=xxxx " "password=xx " …
yet
  • 773
  • 11
  • 19
0
votes
1 answer

cout and sleep cause different results

I have a class that takes user input (username/password), bcrypt hashes the input password to check if it matches the hash stored in the database, and then logs the user in if successful. The problem I'm experiencing is that if I call    cout <<…
aggregate1166877
  • 2,196
  • 23
  • 38
0
votes
1 answer

How can an application determine a rollback?

I'm trying to determine if a transaction fails from the application. How can this be done? Further, is it possible to determine where a transaction failed, such as particular write that violates a constraint?
user1382306
0
votes
1 answer

Can not compile test PostgreSQL program

When I compile my PostgreSQL program in C++, I get these errors. Can anyone tell me the reason for that. user@linux-yyzo:~/WorkDir/Program> g++ test.cpp -lpqxx -I/usr/local/include -I/usr/local/pgsql/include /usr/local/lib/libpqxx.a(util.o): In…
Sameera
  • 304
  • 1
  • 19
0
votes
1 answer

copy from stdin not working for inserting in postgres in C++ using libpqxx

I have been trying to insert bulk data using copy from stdin but it isn't working. Can anyone tell me what I am doing wrong: // Redirecting file input to stdin std::ifstream in("infile.csv"); std::streambuf *cinbuf = std::cin.rdbuf(); // save old…
NewAlgo
  • 31
  • 1
  • 3
1 2 3
15
16