Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread salah jubeh
Hello Robert, >but the scripts are intended to be thin wrappers around >the underlying database functionality, and I think this is straying >too far from that core mission. I think, you have a  good point here. Regards On Friday, January 31, 2014 4:47 PM, Robert Haas wrote: On Fri, Jan 31,

Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread Robert Haas
On Fri, Jan 31, 2014 at 9:09 AM, salah jubeh wrote: >>$ createdb -U postgres hoge >>$ psql -d hoge -U postgres >>hoge=# create table test (col text); >>hoge=# insert into test select repeat(chr(code),1) from >>generate_series(1,10) code; > >> >>$ dropdb -k hoge >>2014-01-29 23:10:49 JST FA

Re: [HACKERS] Add force option to dropdb

2014-01-31 Thread salah jubeh
>$ createdb -U postgres hoge >$ psql -d hoge -U postgres >hoge=# create table test (col text); >hoge=# insert into test select repeat(chr(code),1) from >generate_series(1,10) code; > >$ dropdb -k hoge >2014-01-29 23:10:49 JST FATAL:  terminating connection due to >administrator command >2

Re: [HACKERS] Add force option to dropdb

2014-01-29 Thread Robert Haas
On Wed, Jan 29, 2014 at 4:56 AM, salah jubeh wrote: >>I'm not particularly in favor of implementing this as client-side >>functionality, because then it's only available to people who use that >>particular client. Simon Riggs proposed a server-side option to the >>DROP DATABASE command some time

Re: [HACKERS] Add force option to dropdb

2014-01-29 Thread Sawada Masahiko
On Tue, Jan 28, 2014 at 11:01 PM, salah jubeh wrote: > Hello Sawada, > >>- This patch is not patched to master branch > Sorry, My mistake >>//new connections are not allowed > Corrected. > > I hope now the patch in better state, if somthing left, I will be glad to > fix it > Regards > > > On Tuesd

Re: [HACKERS] Add force option to dropdb

2014-01-29 Thread salah jubeh
Hello Robert, >I'm not particularly in favor of implementing this as client-side >functionality, because then it's only available to people who use that >particular client.  Simon Riggs proposed a server-side option to the >DROP DATABASE command some time ago, and I think that might be the way >

Re: [HACKERS] Add force option to dropdb

2014-01-28 Thread Robert Haas
On Tue, Jan 28, 2014 at 9:01 AM, salah jubeh wrote: > Hello Sawada, > >>- This patch is not patched to master branch > Sorry, My mistake >>//new connections are not allowed > Corrected. > > I hope now the patch in better state, if somthing left, I will be glad to > fix it > Regards I'm not partic

Re: [HACKERS] Add force option to dropdb

2014-01-28 Thread salah jubeh
Hello Sawada, >- This patch is not patched to master branch Sorry, My mistake >//new connections are not allowed Corrected. I hope now the patch in better state, if somthing left, I will be glad to fix it Regards On Tuesday, January 28, 2014 4:17 AM, Sawada Masahiko wrote: On 2014年1月

Re: [HACKERS] Add force option to dropdb

2014-01-27 Thread Sawada Masahiko
On 2014年1月17日 0:56, salah jubeh wrote: > >>If the user owns objects, that will prevent this from working also. I >>have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY >>calls to this utility would be a bit excessive, but who knows. > > Please find attached the first attempt to d

Re: [HACKERS] Add force option to dropdb

2014-01-16 Thread salah jubeh
>If the user owns objects, that will prevent this from working also.  I >have the feeling that adding DROP OWNED BY and/or REASSIGNED OWNED BY >calls to this utility would be a bit excessive, but who knows. Please find attached the first attempt to drop drop the client connections. I have added

Re: [HACKERS] Add force option to dropdb

2014-01-14 Thread Alvaro Herrera
salah jubeh wrote: > For the sake of completeness: > 1. I think also, I need also to temporary disallow conecting to the database, > is that right? > 2. Is there other factors can hinder dropping database? If the user owns objects, that will prevent this from working also. I have the feeling th

[HACKERS] Add force option to dropdb

2014-01-14 Thread salah jubeh
Hello, I think adding a force option to dropdb is usefull for many purposes, mainly; scripting. For example, in a test enviroment, I restore a daily backup of production databases. The newly created databases are used as templates for development and also for reading, thus replacing them is com