Re: [GENERAL] DB alias ?

2013-01-24 Thread Guillaume Lelarge
On Thu, 2013-01-24 at 09:01 +0530, Shridhar Daithankar wrote: On Wednesday, January 23, 2013 09:39:43 PM Gauthier, Dave wrote: Then someone who wants to look at old JAN data will have the same problem :-( If I recall, Oracle enables something like this. Multiple tnsfilenames (or

Re: [GENERAL] DB alias ?

2013-01-24 Thread Albe Laurenz
Guillaume Lelarge wrote: On Thu, 2013-01-24 at 09:01 +0530, Shridhar Daithankar wrote: On Wednesday, January 23, 2013 09:39:43 PM Gauthier, Dave wrote: Then someone who wants to look at old JAN data will have the same problem :-( If I recall, Oracle enables something like this.

Re: [GENERAL] Jobs for a Oracle/Postgres DBAs in Australia

2013-01-24 Thread Joshua D. Drake
Hello, It is great to see the Australian market pick up. However, this really belongs in pgsql-jobs. Sincerely, JD On 01/23/2013 09:21 PM, Cameron Shorter wrote: I'm hoping this opportunity will be of interest to some of you on this list: LISAsoft [0] has expanded our Australian/New

[GENERAL] Logging successful SELECTS?

2013-01-24 Thread Matthew Vernon
Hi, I can get postgres to log unsuccessful queries, including the user who wrote them, but I'm missing how to get postgres to log the successful queries too (I don't need a store of the answer, just the query itself). How do I do this? Thanks, Matthew -- Matthew Vernon Quantitative Veterinary

Re: [GENERAL] Optimizing select count query which often takes over 10 seconds

2013-01-24 Thread Moshe Jacobson
On Thu, Jan 24, 2013 at 4:57 AM, Alexander Farber alexander.far...@gmail.com wrote: select count(id) from ( select id, row_number() over(partition by yw order by money desc) as ranking from pref_money ) x where x.ranking =

Re: [GENERAL] Logging successful SELECTS?

2013-01-24 Thread Виктор Егоров
2013/1/24 Matthew Vernon matthew.ver...@sac.ac.uk: I can get postgres to log unsuccessful queries, including the user who wrote them, but I'm missing how to get postgres to log the successful queries too (I don't need a store of the answer, just the query itself). How do I do this? You can

Re: [GENERAL] DB alias ?

2013-01-24 Thread Gauthier, Dave
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Shridhar Daithankar Sent: Wednesday, January 23, 2013 10:32 PM To: pgsql-general@postgresql.org Cc: Gauthier, Dave; Rob Sargent Subject: Re: [GENERAL] DB alias ? On Wednesday, January 23, 2013

Re: [GENERAL] Optimizing select count query which often takes over 10 seconds

2013-01-24 Thread Alexander Farber
Hello - On Thu, Jan 24, 2013 at 3:39 PM, Alban Hertroys haram...@gmail.com wrote: On 24 January 2013 10:57, Alexander Farber alexander.far...@gmail.com wrote: # explain analyze select count(id) from ( select id, row_number() over(partition by yw order by money

[GENERAL] How to identify the source of a deadlock?

2013-01-24 Thread Stefan Froehlich
There is an application A doing some things in a database. In the middle of the program, application B is called which does some other things. Now for some reason application B hangs for certain inputs and I have to find out the reason for this. The sequence is: | A: BEGIN | A: [does some things]

Re: [GENERAL] noobie question

2013-01-24 Thread Adrian Klaver
On 01/24/2013 08:47 AM, Steve Clark wrote: Hi list, This may be really simple - I usually do it using a procedural language such as php or a bash script. Say I have a table that has 2 columns like create table foo ( id integer not null, name text ); CREATE UNIQUE INDEX foo_pkey on foo

[GENERAL] main.log file not being updated

2013-01-24 Thread Anson Abraham
my postgresql-9.0-main.log log file is 0 bytes. Postgres user has perms to write to it. And and postgresql.conf file shows to log, but it's not. Not sure why. I have the defaults set in except for these changes: log_connections = on log_disconnections = on log_duration = off log_line_prefix

Re: [GENERAL] noobie question

2013-01-24 Thread Jeff Janes
On Thu, Jan 24, 2013 at 8:53 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Jan 25, 2013 at 3:47 AM, Steve Clark scl...@netwolves.com wrote: Say I have a table that has 2 columns like create table foo ( id integer not null, name text ); CREATE UNIQUE INDEX foo_pkey on foo using

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Adrian Klaver
On 01/24/2013 09:29 AM, Anson Abraham wrote: my postgresql-9.0-main.log log file is 0 bytes. Postgres user has perms to write to it. And and postgresql.conf file shows to log, but it's not. Not sure why. I have the defaults set in except for these changes: log_connections = on

Re: [GENERAL] noobie question

2013-01-24 Thread Steve Clark
On 01/24/2013 12:36 PM, Jeff Janes wrote: On Thu, Jan 24, 2013 at 8:53 AM, Chris Angelico ros...@gmail.com wrote: On Fri, Jan 25, 2013 at 3:47 AM, Steve Clark scl...@netwolves.com wrote: Say I have a table that has 2 columns like create table foo ( id integer not null, name text );

[GENERAL] date_trunc to aggregate by timestamp?

2013-01-24 Thread Kirk Wythers
I am trying to some up with an approach that uses date_truc to aggregate 15 minute time series data to hourly bins. My current query which utilizes a view, does performs a join after which I use a series a WHERE statements to specify which of the 15 minute records I want to look at. I think

Re: [GENERAL] noobie question

2013-01-24 Thread Gauthier, Dave
-Original Message- From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Steve Clark Sent: Thursday, January 24, 2013 12:46 PM To: Jeff Janes Cc: Chris Angelico; pgsql-general@postgresql.org Subject: Re: [GENERAL] noobie question On

Re: [GENERAL] noobie question

2013-01-24 Thread Chris Angelico
On Fri, Jan 25, 2013 at 4:45 AM, Steve Clark scl...@netwolves.com wrote: Thanks All, This is for a few very small tables, less 100 records each, that a user can delete and insert records into based on the id which is displayed in a php generated html screen. The tables are rarely updated and

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Anson Abraham
#log_destination = 'stderr' #logging_collector = off It was when it was restarted that this didn't start logging. To restart is an option, but one I'd like to avoid. It's 9.0 on debian squeeze. init.d/postgres start It was writing before. Just stopped after the last restart or rather reload

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Adrian Klaver
On 01/24/2013 10:36 AM, Anson Abraham wrote: #log_destination = 'stderr' #logging_collector = off It was when it was restarted that this didn't start logging. To restart is an option, but one I'd like to avoid. It's 9.0 on debian squeeze. init.d/postgres start It was writing before. Just

Re: [GENERAL] noobie question

2013-01-24 Thread Steve Clark
On 01/24/2013 01:06 PM, Chris Angelico wrote: On Fri, Jan 25, 2013 at 4:45 AM, Steve Clark scl...@netwolves.com wrote: Thanks All, This is for a few very small tables, less 100 records each, that a user can delete and insert records into based on the id which is displayed in a php generated

Re: [GENERAL] Optimizing select count query which often takes over 10 seconds

2013-01-24 Thread Guillaume Lelarge
On Thu, 2013-01-24 at 15:45 +0100, Alexander Farber wrote: Hello - On Thu, Jan 24, 2013 at 3:39 PM, Alban Hertroys haram...@gmail.com wrote: On 24 January 2013 10:57, Alexander Farber alexander.far...@gmail.com wrote: # explain analyze select count(id) from ( select id,

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Adrian Klaver
On 01/24/2013 12:44 PM, Anson Abraham wrote: i've always had logging_collector off. it would still log query / transactions that failed to the syslog (var/log/postgres/postgres-9.0-main.log). the only thing I've changed was turning log_duration back to off. But I've gone back and forth with

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Adrian Klaver
On 01/24/2013 01:38 PM, Anson Abraham wrote: I though to do that w/ log_destination, but i left everything pretty much default except those params I mentioned earlier. Interestingly i have another DB server (same ver, etc...) w/ exact same config params w/ postgres and sys log config and that

Re: [GENERAL] main.log file not being updated

2013-01-24 Thread Anson Abraham
I though to do that w/ log_destination, but i left everything pretty much default except those params I mentioned earlier. Interestingly i have another DB server (same ver, etc...) w/ exact same config params w/ postgres and sys log config and that is writing to the system postgres log. it's a

[GENERAL] Postgresql error

2013-01-24 Thread MarkB
I have written a program where 2 computers are connected to the same database. The first PC executes an update statement and then sends a notification. This makes the second PC execute a select statement on the same table. The second PC then gets an error: 'Field Fieldname not found' I have no

Re: [GENERAL] SELinux users - Please consider testing SELinux/SEPostgreSQL patches

2013-01-24 Thread Craig Ringer
On 01/21/2013 03:47 PM, Craig Ringer wrote: Hi all Anybody here who has particular interest in or skill with SELinux is invited (begged?) to help test KaiGai Kohei's patches for enhancing PostgreSQL's SELinux/SEPostgreSQL support. These changes are proposed for 9.3, but have had relatively

Re: [GENERAL] Postgresql error

2013-01-24 Thread Kevin Grittner
MarkB wrote: I have written a program where 2 computers are connected to the same database. The first PC executes an update statement and then sends a notification. This makes the second PC execute a select statement on the same table. The second PC then gets an error: 'Field Fieldname not

Re: [GENERAL] Postgresql error

2013-01-24 Thread Adrian Klaver
On 01/23/2013 04:41 PM, MarkB wrote: I have written a program where 2 computers are connected to the same database. The first PC executes an update statement and then sends a notification. This makes the second PC execute a select statement on the same table. The second PC then gets an error:

Re: [GENERAL] seeking SQL book recommendation

2013-01-24 Thread Bruno Wolff III
On Wed, Jan 23, 2013 at 15:56:10 -0700, Scott Ribe scott_r...@elevated-dev.com wrote: For a client who needs to learn how to query the db: - No SQL knowledge at all; needs to start from square 1. - Smart, capable person, who will be in this position for a long time, using this db for a long

Re: [GENERAL] noobie question

2013-01-24 Thread Bruno Wolff III
On Thu, Jan 24, 2013 at 14:03:33 -0500, Steve Clark scl...@netwolves.com wrote: It is really called rule_num and relates to in what order firewall rules are applied. And it used to allow the user to place the firewall rules where they want them in relation to other rules. If you just need