Re: Feature Request: DROP ALL FROM DATABASE database_name

From: Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Feature Request: DROP ALL FROM DATABASE database_name
Date: 2002-01-08 23:57:34
Message-ID: 3C3B876E.7000804@ics.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<body>
Bruce Momjian wrote:<br>
<blockquote type="cite" cite="mid:200201082333(dot)g08NXuo16483(at)candle(dot)pha(dot)pa(dot)us">
<pre wrap="">Thomas Swan wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">This could be useful for cleaning out a database (sequences, triggers, <br>rules) without deleting it and without having to create it, thus <br>preserving permissions/owner information.<br></pre>
</blockquote>
<pre wrap=""><!----><br>Why delete just those? I don't see a compelling usefulness.<br><br></pre>
</blockquote>
You have to explicitly name all of them. &nbsp; Also, some of those are unnamed
if they were auto created. &nbsp;<br>
<br>
Also, the SERIAL datatype creates an auto_named sequence that's not always
easy to figure out. &nbsp; &nbsp;And, dropping a table leaves that sequence still intact.
<br>
<br>
On the owner permissions front. &nbsp; &nbsp;If someone is developing and wants to
wipe their database and start fresh, &nbsp;the easiest way is to do a drop database,
and create database. &nbsp; But, that would require the createdatabase right.
&nbsp; &nbsp;But, in a situation where multiple developers are working on different
databases, this is awkward. &nbsp; &nbsp; The proposed request always a normal user
to clean that database and start fresh, so to speak.<br>
<br>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 1.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-01-09 00:27:10 Re: ECPG warning
Previous Message Tom Lane 2002-01-08 23:50:15 Re: Feature Request: DROP ALL FROM DATABASE database_name