[ADMIN] Audit Trail

2007-08-13 Thread Khan, Mahmood Ahram
Hi All, As I want to do audit on some tables for Insert Update & Delete. So I am trying to create a function. To enable the auditing I need to create this function which I am unable to & the error below. Can anybody help with this. Or any documentation link for this particular function. I am

Re: [ADMIN] Audit Trail

2007-08-13 Thread Kevin Grittner
>>> On Mon, Aug 13, 2007 at 12:24 AM, in message <[EMAIL PROTECTED]>, "Khan, Mahmood Ahram" <[EMAIL PROTECTED]> wrote: > To enable the auditing I need to create this function which I am unable > to & the error below. Add a line like this after you include the PostgreSQL .h files: PG_MODULE_MAG

[ADMIN] except command

2007-08-13 Thread olivier boissard
Hello I tried to use the except command in postgresql 8.1 I don't understand as it works When I read doc , I understand that it was like a difference betwwen two queries However , It looks as if the 2nd part was ignored I tried to test by dblink a query unising except on the same database and

Re: [ADMIN] except command

2007-08-13 Thread Kevin Grittner
>>> On Mon, Aug 13, 2007 at 12:50 PM, in message <[EMAIL PROTECTED]>, olivier boissard <[EMAIL PROTECTED]> wrote: > I tried to use the except command in postgresql 8.1 > I don't understand as it works > When I read doc , I understand that it was like a difference betwwen two > queries That isn't

Re: [ADMIN] except command

2007-08-13 Thread Steve Holdoway
On Mon, 13 Aug 2007 13:07:43 -0500 "Kevin Grittner" <[EMAIL PROTECTED]> wrote: > >>> On Mon, Aug 13, 2007 at 12:50 PM, in message <[EMAIL PROTECTED]>, > olivier boissard <[EMAIL PROTECTED]> wrote: > > I tried to use the except command in postgresql 8.1 > > I don't understand as it works > > When

Re: [ADMIN] except command

2007-08-13 Thread Kevin Grittner
>>> On Mon, Aug 13, 2007 at 1:13 PM, in message <[EMAIL PROTECTED]>, Steve Holdoway <[EMAIL PROTECTED]> wrote: > On Mon, 13 Aug 2007 13:07:43 -0500 > "Kevin Grittner" <[EMAIL PROTECTED]> wrote: >> This gets me all the eye color codes that don't start with the letter 'B'. >> (There are of course e

Re: [ADMIN] entries in serverlog file

2007-08-13 Thread Tena Sakai
Hi Everybody, I have read chapter 17 of the current manual and learned interesting options. But as I compare what's in the postgresql.conf file to what I think I comprehend, I am a slightly confused: In the conf file I see log_destination is set as 'stderr' and redirect_stderr is set as off AND

Re: [ADMIN] entries in serverlog file

2007-08-13 Thread Tom Lane
"Tena Sakai" <[EMAIL PROTECTED]> writes: > Can I just uncomment log_line_prefix entry and stick what I want > (such as %u, %d, %m, etc) into the quotes and expect to see the > logged lines be prefixed with username, database name, timestamp, > etc with all other things intact? Sure; you will howev

Re: [ADMIN] entries in serverlog file

2007-08-13 Thread Tena Sakai
Hi Tom, Thanks. I will live a bit dangerously while I strategize what to do with the logfile. I am not sure if 7 day log rotation is really a wise option for now. I will come up with something fitting in time. Thanks for your comment, nonetheless. Regards, Tena Sakai [EMAIL PROTECTED]

[ADMIN] plpgsql question/problem

2007-08-13 Thread Hyatt, Gordon
I'm not sure if this is the correct list for this question, but I'll give it a shot anyway. (If this is not the correct list, please suggest the correct one.) I've written a number of plpgsql functions to convert a database from MS Access into Postgres (v8.2.4 on Windows 2000 SP4) and have the

Re: [ADMIN] plpgsql question/problem

2007-08-13 Thread Scott Marlowe
On 8/13/07, Hyatt, Gordon <[EMAIL PROTECTED]> wrote: > > I'm not sure if this is the correct list for this question, but I'll give it > a shot anyway. (If this is not the correct list, please suggest the correct > one.) CODE SNIPPED. > When I attempt to run insert_a_and_b, insert_b fails with

Re: [ADMIN] plpgsql question/problem

2007-08-13 Thread Tom Lane
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On 8/13/07, Hyatt, Gordon <[EMAIL PROTECTED]> wrote: >> When I attempt to run insert_a_and_b, insert_b fails with a foreign key >> violation. > I ran your exact same code and it worked fine. Note that I changed one line: Works for me too (with Scott

Re: [ADMIN] except command

2007-08-13 Thread [EMAIL PROTECTED]
Thanks for your explanation And your small example was better as one page documentation I was totally wrong. So it's like a filter on the first query I think it's useful when we have complex queries . Olivier Kevin Grittner a écrit : On Mon, Aug 13, 2007 at 1:13 PM, in message <[EM

[ADMIN] postmaster.pid file

2007-08-13 Thread Tena Sakai
Hi Everybody, I experienced something a bit strange. When I issued, on a linux machine, the following command as user postgres: ~/bin/pg_ctl -D ~/bin reload It wasn't happy. The complaint was: pg_ctl: PID file "/usr/local/pgsql/bin/postmaster.pid" does not exist Is server running? Up

Re: [ADMIN] except command

2007-08-13 Thread Kevin Grittner
>>> On Mon, Aug 13, 2007 at 4:30 PM, in message <[EMAIL PROTECTED]>, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > So it's like a filter on the first query Exactly; I think that sums it up better than anything I said. By the way, it does strike me as an odd omission that there is no set ope

Re: [ADMIN] except command

2007-08-13 Thread [EMAIL PROTECTED]
Yes I noticed It was not an ANSI sql operator I think it's a good solution to spare temporay tables or result set I was searching a way to ease some réplication scripts but I don't think it will help me. It's better to use it to get a couple of records inside complex queries from many tables .

Re: [ADMIN] postmaster.pid file

2007-08-13 Thread Tom Lane
"Tena Sakai" <[EMAIL PROTECTED]> writes: > When I issued, on a linux machine, the following > command as user postgres: > ~/bin/pg_ctl -D ~/bin reload > It wasn't happy. As well it shouldn't be. -D is supposed to specify the data directory, not the place where the executables are. > Upon che

Re: [ADMIN] postmaster.pid file

2007-08-13 Thread Tena Sakai
Thank you, Tom. As I typed: ~/bin/pg_ctl -D ~/bin reload I thought I had typed: ~/bin/pg_ctl -D ~/data reload (Had I not copied-and-pasted the actual command, I would have given you the correct line, which would have been really bad!) I was blind! I got the extra file in ~/bin director

[ADMIN] postmaster restart on a different dataDir

2007-08-13 Thread Medi Montaseri
Hi, I am trying to measure startup time of postmaster. Say I have postmaster running on -D /tmp/d1 and would like to restart it on -D /tmp/d2. If I just say time pg_ctl restart -D /tmp/d2 it will not produce an accurate result because pg_ctl will start postmaster in the background and return imme

Re: [ADMIN] postmaster.pid file

2007-08-13 Thread Tom Lane
"Tena Sakai" <[EMAIL PROTECTED]> writes: > As I typed: > ~/bin/pg_ctl -D ~/bin reload > I thought I had typed: > ~/bin/pg_ctl -D ~/data reload I recommend setting up PGDATA as an environment variable, so you never have to type it at all ... regards, tom lane -