Re: [GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Alec Swan
Thanks, I got duration logging to work the way I wanted. I will look into logrotate next. On Fri, Sep 16, 2011 at 11:22 AM, Thom Brown wrote: > On 16 September 2011 18:16, Alec Swan wrote: >> Hello, >> >> I am trying to get postgres 8.4.4 to log the duration and stateme

[GENERAL] Log duration and statement for slow queries + limiting the number of log files generated

2011-09-16 Thread Alec Swan
Hello, I am trying to get postgres 8.4.4 to log the duration and statement of queries that take longer than 200 ms. I played with the log settings in postgresql.conf but I still see logs of durations of very fast statements. Here is my current configuration: log_min_duration_statement = 200 log_d

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
Berend, thanks for posting a part of your schema. In OO terms you used incapsulation by providing a reference from customer table to organization table instead of inheritance. This makes sense. But again, in order to find a supplier represented by an organizaion record, your business layer would

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
I understand your bang theory perfectly :) I just wanted to know if there were plans to fix this. I just looked at the TODO list at http://developer.postgresql.org/todo.php and found the section with inherited ref. constraints in the Indexes section. On the TODO page it says: "A hyphen, "-", mar

Re: [GENERAL] table inheritance and DB design

2004-12-03 Thread Alec Swan
Berend, I understand your alternative design. So, you are suggesting to have a Resource table and a Car table and a ResCar many-to-many relation. This will work, but it's not extensible. Suppose, my application needs to find the resource that is assigned to an appointment. My program will have to

[GENERAL] table inheritance and DB design

2004-12-02 Thread Alec Swan
Greetings.   I am trying to create a database, which allows me to store appointment information. The key here is that I don't know what resources will be associated with an appointment, but they will all have a unique id. So, I want to have an Appointment table, a Resource table and a many-to-many