Re: Audit-trail engine: getting the application's layer user_id

From: "Marcelo de Moraes Serpa" <celoserpa(at)gmail(dot)com>
To: "Manuel Sugawara" <masm(at)fciencias(dot)unam(dot)mx>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Audit-trail engine: getting the application's layer user_id
Date: 2007-04-25 20:19:22
Message-ID: 1e5bcefd0704251319p191a6497r42aa5caed5f33489@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

I know I may be asking too much, but I have a very limited C/C++ (as well as
PostgreSQL internal architecture) knowledge. I've tried compiling the C
source code Manuel sent as a PostgreSQL loadable module on Visual Studio
.NET 2003 (C++) without success (lots of missing identifiers, "int Datum"
redefinition and other things I didn't really understood). The comments in
the Postgres 8.0 manual didn't help much.

If anyone could put me on the right direction on how to write/build C/C++
PostgreSQL on the Windows platform (specifically Windows XP) I would be
grateful as I really need this thing working as soon as possible.

Thanks,

Marcelo.

On 4/25/07, Marcelo de Moraes Serpa <celoserpa(at)gmail(dot)com> wrote:
>
> I'm doing it form the application layer and I don't think it can be
> > done in the database layer, how the trigger will figure out which user
> > is doing the query?, It's the same problem you are trying to solve!
> >
>
> Duh! That is what happens when you start having high levels of caffeinne
> in your blood and haven't had a good night sleep... thanks for putting me on
> the track again.
>
> I will study Tim's approach more. This thing got more complicated than I
> thought it would be. At least I'm learning more about PostgreSQL internal
> architecture.
>
> Thank you for your help.
>
> Marcelo.
>
> On 4/25/07, Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx> wrote:
> >
> > "Marcelo de Moraes Serpa" <celoserpa(at)gmail(dot)com> writes:
> >
> > > Hi Manuel,
> > >
> > >> each time the user sends a request I do more or less the following:
> > >
> > > Could a trigger be used to implement this ? Or are you doing this from
> > the
> > > application layer?
> >
> > I'm doing it form the application layer and I don't think it can be
> > done in the database layer, how the trigger will figure out which user
> > is doing the query?, It's the same problem you are trying to solve!
> >
> > > My problem is that, like Til, I don't have full control over my
> > > request cycle as I'm over a very high-level framework (Actually it
> > > is an data-oriented application generator, called GeneXus).
> >
> > Maybe you can use Til approach with temporal tables.
> >
> > Regards,
> > Manuel.
> >
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas F. O'Connell 2007-04-25 20:26:19 Re: [DOCS] Incrementally Updated Backups: Docs Clarification
Previous Message Porell, Chris 2007-04-25 19:10:59 Re: PosegreSQL support