Re: [GENERAL] history table

2007-08-21 Thread Robin Helgelin
On 8/21/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: > Well, I can't find a way to set a variable associated with a connection, > so probably the easiest thing to do is to add an "updated_by" column to > your regular table (i.e., the non-history version.) Then just include > the userid from your w

Re: [GENERAL] history table

2007-08-21 Thread Guy Rouillier
Robin Helgelin wrote: On 8/21/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: Well, you haven't told us much about your webapp. Are you using connection pooling? If so, then you'll need to provide the webapp userid as an additional parameter to your database updates. If you are not using connect

Re: [GENERAL] history table

2007-08-21 Thread Ed L.
On Tuesday 21 August 2007 1:42 pm, Ed L. wrote: > Then you could > store the user ID in an update_session_id column and tablelog > would help track of the history. s/user ID/session ID/g; Ed ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [GENERAL] history table

2007-08-21 Thread Ed L.
On Tuesday 21 August 2007 1:22 pm, Robin Helgelin wrote: > > Yes, this is where I'm too new to postgresql, how do I tell > the database which user is logged in to the webapp? A session > parameter? There will be connection pooling, but if I know how > to solve the previous question I don't think it

Re: [GENERAL] history table

2007-08-21 Thread Robin Helgelin
On 8/21/07, Guy Rouillier <[EMAIL PROTECTED]> wrote: > Well, you haven't told us much about your webapp. Are you using > connection pooling? If so, then you'll need to provide the webapp > userid as an additional parameter to your database updates. If you are > not using connection pooling, such

Re: [GENERAL] history table

2007-08-21 Thread Guy Rouillier
Robin Helgelin wrote: Hi, I want to save history for a few tables using triggers on update and creation. What's the best approach to do this in a webapp environment where I want to save which webapp user that is doing the change, not the postgresql user? Well, you haven't told us much about y

Re: [GENERAL] history table

2007-08-21 Thread A. Kretschmer
am Tue, dem 21.08.2007, um 20:20:38 +0200 mailte Robin Helgelin folgendes: > Hi, > > I want to save history for a few tables using triggers on update and > creation. What's the best approach to do this in a webapp environment > where I want to save which webapp user that is doing the change, not

[GENERAL] history table

2007-08-21 Thread Robin Helgelin
Hi, I want to save history for a few tables using triggers on update and creation. What's the best approach to do this in a webapp environment where I want to save which webapp user that is doing the change, not the postgresql user? -- regards, Robin ---(