Capture the SQL statement text with libpq [was: Re: Help]

From: Alberto Cabello Sánchez <alberto(at)unex(dot)es>
To: MOHAMMED-BOUZIANE Ilyes <i_mohammed_bouziane(at)esi(dot)dz>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Capture the SQL statement text with libpq [was: Re: Help]
Date: 2014-04-09 23:04:36
Message-ID: 20140410010436.b4a0c65b353ac4cf5a48036b@unex.es
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 9 Apr 2014 14:41:46 +0100
MOHAMMED-BOUZIANE Ilyes <i_mohammed_bouziane(at)esi(dot)dz> wrote:

> my master thesis is "database replication based on snapshot isolation"

> I encounter somme difficulties to implement a middleware baesd
> replication with Libpq and c language, for that, I need somme hints to
> achieve this work, more precisely, how to capture the SQL statement
> text with libpq at the middleware layer.

Hi, Mohammed

I think you could take a look at the code in SQLRelay [1], a middleware which
knows how to intercept SQL queries, and uses libpq for talking to PostgreSQL.

[1] http://sourceforge.net/projects/sqlrelay/

--
Alberto Cabello Sánchez <alberto(at)unex(dot)es>

In response to

  • Help at 2014-04-09 13:41:46 from MOHAMMED-BOUZIANE Ilyes

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2014-04-09 23:32:44 Re: import .sql file into PostgreSQL database
Previous Message Tomas Vondra 2014-04-09 22:59:58 Re: encrypting data stored in PostgreSQL