Re: [GENERAL] query performance, though it was timestamps,maybe just table size?

2012-12-01 Thread Jeff Janes
On Fri, Nov 30, 2012 at 12:22 PM, Henry Drexler wrote: > On Fri, Nov 30, 2012 at 1:42 PM, Jeff Janes wrote: >> >> Can you report the EXPLAIN (ANALYZE, BUFFERS) instead? > > > Thanks, here they are: > > for the approx 65 million row approx 50 min version: > > EXPLAIN (ANALYZE, BUFFERS) > select >

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-01 Thread Pavan Deolasee
On Sun, Dec 2, 2012 at 7:53 AM, Edson Richter wrote: > Em 01/12/2012 22:22, Chris Angelico escreveu: > > On Sun, Dec 2, 2012 at 10:20 AM, Edson Richter >> wrote: >> >>> I've put both files in ~/deny_drop folder, and executed "make": >>> >>> # LANG=C make >>> Makefile:13: ../../src/Makefile.globa

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-01 Thread Edson Richter
Em 01/12/2012 22:22, Chris Angelico escreveu: On Sun, Dec 2, 2012 at 10:20 AM, Edson Richter wrote: I've put both files in ~/deny_drop folder, and executed "make": # LANG=C make Makefile:13: ../../src/Makefile.global: No such file or directory Makefile:14: /contrib/contrib-global.mk: No such f

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-01 Thread Chris Angelico
On Sun, Dec 2, 2012 at 10:20 AM, Edson Richter wrote: > I've put both files in ~/deny_drop folder, and executed "make": > > # LANG=C make > Makefile:13: ../../src/Makefile.global: No such file or directory > Makefile:14: /contrib/contrib-global.mk: No such file or directory > make: *** No rule to

Re: [GENERAL] Revoke "drop database" even for superusers?

2012-12-01 Thread Edson Richter
Em 23/11/2012 19:18, Guillaume Lelarge escreveu: On Fri, 2012-11-09 at 09:19 -0200, Edson Richter wrote: I've a bunch of databases that cannot be dropped in any case. I was wondering if it is possible to revoke "drop database" permission for all users, in order that even superuser, if he wishes

Re: [GENERAL] execute if statement

2012-12-01 Thread Raymond O'Donnell
On 01/12/2012 19:44, Peter Kroon wrote: > M... > > How do I execute dynamic sql that starts with an if statement. > I'm converting mssql code to pgsql. > Without trying it, I'd guess that you need to have the IF outside the dynamic code, something like this: if then execute '

Re: [GENERAL] execute if statement

2012-12-01 Thread Peter Kroon
To give a better idea: DO $$ DECLARE v_string text = 'raise notice ''%'', ''this could be sql with if statement...'';'; BEGIN if 1=1 then raise notice '%', ' first notice has been raised...'; end if; EXECUTE v_string;--this fails END; $$ LANGUAGE plpgsql; I do not wish to create a function for ea

Re: [GENERAL] execute if statement

2012-12-01 Thread Peter Kroon
M... How do I execute dynamic sql that starts with an if statement. I'm converting mssql code to pgsql. 2012/12/1 Raymond O'Donnell > On 01/12/2012 19:11, Peter Kroon wrote: > > How can I achieve this? > > > > EXECUTE ' > > > > if 1=1 then > > raise notice ''%'', ''notice has been rais

Re: [GENERAL] execute if statement

2012-12-01 Thread Raymond O'Donnell
On 01/12/2012 19:11, Peter Kroon wrote: > How can I achieve this? > > EXECUTE ' > > if 1=1 then > raise notice ''%'', ''notice has been raised...''; > end if; > > '; I think EXECUTE used like this is available only in a function: create or replace function my_function() returns void as

[GENERAL] execute if statement

2012-12-01 Thread Peter Kroon
How can I achieve this? EXECUTE ' if 1=1 then raise notice ''%'', ''notice has been raised...''; end if; ';

Re: [GENERAL] pg_listening_channels()

2012-12-01 Thread Dmitriy Igrishin
2012/11/30 Igor Neyman > > -Original Message- > > From: Greg Sabino Mullane [mailto:g...@turnstep.com] > > Sent: Thursday, November 29, 2012 11:34 PM > > To: pgsql-general@postgresql.org > > Subject: Re: pg_listening_channels() > > > > > > On the contrary, it was very well discussed and d

Re: [GENERAL] pg_basebackup questions

2012-12-01 Thread Magnus Hagander
On Fri, Nov 30, 2012 at 7:28 PM, hartrc wrote: > Hi, > > PostgreSQL 9.1.6 > Linux (SLES 11) > > i have a pg_basebackup job that is executed within a script. > My command is: > > /postgresql/v91/bin/pg_basebackup -h 127.0.0.1 -D > /postgresql/pg_backup/backupdir -Ft -Z 5 > > The result of this crea