pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
template1 database...
8+ messages / 7 participants
[nested] [flat]

* template1 database...
@ 2003-08-20 19:03 Thomas LeBlanc <thomasatiem@hotmail.com>
  2003-08-20 19:46 ` Re: template1 database... Devrim GUNDUZ <devrim@gunduz.org>
  0 siblings, 1 reply; 8+ messages in thread

From: Thomas LeBlanc @ 2003-08-20 19:03 UTC (permalink / raw)
  To: pgsql-admin

We have accidentally added tables and other objects to this database.

How do we return template1 back to the default setup?

Thomas LeBlanc

_________________________________________________________________
<b>Get MSN 8</b> and help protect your children with advanced parental 
controls.  http://join.msn.com/?page=features/parental




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database...
  2003-08-20 19:03 template1 database... Thomas LeBlanc <thomasatiem@hotmail.com>
@ 2003-08-20 19:46 ` Devrim GUNDUZ <devrim@gunduz.org>
  2003-08-23 16:38   ` Re: template1 database... Chris M <chris@none.none>
  0 siblings, 1 reply; 8+ messages in thread

From: Devrim GUNDUZ @ 2003-08-20 19:46 UTC (permalink / raw)
  To: Thomas LeBlanc <thomasatiem@hotmail.com>; +Cc: pgsql-admin


Hi,

On Wed, 20 Aug 2003, Thomas LeBlanc wrote:

> We have accidentally added tables and other objects to this database.
> 
> How do we return template1 back to the default setup?

I think this will help you:

http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php
Written by Josh Berkus.

Regards,
-- 
Devrim GUNDUZ
devrim@gunduz.org				devrim.gunduz@linux.org.tr 
			http://www.tdmsoft.com
			http://www.gunduz.org




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database...
  2003-08-20 19:03 template1 database... Thomas LeBlanc <thomasatiem@hotmail.com>
  2003-08-20 19:46 ` Re: template1 database... Devrim GUNDUZ <devrim@gunduz.org>
@ 2003-08-23 16:38   ` Chris M <chris@none.none>
  2003-08-25 15:19     ` Re: template1 database... Bruno Wolff III <bruno@wolff.to>
  0 siblings, 1 reply; 8+ messages in thread

From: Chris M @ 2003-08-23 16:38 UTC (permalink / raw)
  To: pgsql-admin


The link is very good. But another question.
In PostgreSQL, a superuser can modify almost everything in the
databases. But I don't think that should be the default. Maybe
adding an option is better. When a superuser want to change
something owned by the system, he or she can turn the option
on, then do what he want. After that, the option should be turned
back to off.

"Devrim GUNDUZ" <devrim@gunduz.org>
news:Pine.LNX.4.44.0308202243580.10233-100000@emo.org.tr...
>
> Hi,
>
> On Wed, 20 Aug 2003, Thomas LeBlanc wrote:
>
> > We have accidentally added tables and other objects to this database.
> >
> > How do we return template1 back to the default setup?
>
> I think this will help you:
>
> http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php
> Written by Josh Berkus.
>
> Regards,
> -- 
> Devrim GUNDUZ
> devrim@gunduz.org devrim.gunduz@linux.org.tr
> http://www.tdmsoft.com
> http://www.gunduz.org
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database...
  2003-08-20 19:03 template1 database... Thomas LeBlanc <thomasatiem@hotmail.com>
  2003-08-20 19:46 ` Re: template1 database... Devrim GUNDUZ <devrim@gunduz.org>
  2003-08-23 16:38   ` Re: template1 database... Chris M <chris@none.none>
@ 2003-08-25 15:19     ` Bruno Wolff III <bruno@wolff.to>
  2003-08-25 15:51       ` Re: template1 database... Chris M <chris@none.none>
  0 siblings, 1 reply; 8+ messages in thread

From: Bruno Wolff III @ 2003-08-25 15:19 UTC (permalink / raw)
  To: Chris M <chris@none.none>; +Cc: pgsql-admin

On Sun, Aug 24, 2003 at 00:38:35 +0800,
  Chris M <chris@none.none> wrote:
> 
> The link is very good. But another question.
> In PostgreSQL, a superuser can modify almost everything in the
> databases. But I don't think that should be the default. Maybe
> adding an option is better. When a superuser want to change
> something owned by the system, he or she can turn the option
> on, then do what he want. After that, the option should be turned
> back to off.

This is usually accomplished by logging in as a normal user for most
tasks and only using a superuser account when it is needed.



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database...
  2003-08-20 19:03 template1 database... Thomas LeBlanc <thomasatiem@hotmail.com>
  2003-08-20 19:46 ` Re: template1 database... Devrim GUNDUZ <devrim@gunduz.org>
  2003-08-23 16:38   ` Re: template1 database... Chris M <chris@none.none>
  2003-08-25 15:19     ` Re: template1 database... Bruno Wolff III <bruno@wolff.to>
@ 2003-08-25 15:51       ` Chris M <chris@none.none>
  0 siblings, 0 replies; 8+ messages in thread

From: Chris M @ 2003-08-25 15:51 UTC (permalink / raw)
  To: pgsql-admin

"Bruno Wolff III" <bruno@wolff.to>>
> This is usually accomplished by logging in as a normal user for most
> tasks and only using a superuser account when it is needed.

Yes. DBAs should be careful when operating on the databases.

But I have seen many people using the superuser in MS SQL
Server to operate on the databases. Maybe that's why MS SQL
Server has an option to allow a superuser  change system
objects or not. That's why I think the option is useful for users,
especially those familar with MS Windows.





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* template1 database
@ 2005-03-10 08:17 Eimantas Vaičiūnas <eimantas.vaiciunas@sc.vu.lt>
  2005-03-10 06:36 ` Re: template1 database Tom Lane <tgl@sss.pgh.pa.us>
  2005-03-10 07:20 ` Re: template1 database Michael Fuhr <mike@fuhr.org>
  0 siblings, 2 replies; 8+ messages in thread

From: Eimantas Vaičiūnas @ 2005-03-10 08:17 UTC (permalink / raw)
  To: pgsql-admin

Hi list,

I've recently started using PgSQL and i must say it gose quite good as far as 
i can say. Just been wondering how important is template1 database to PgSQL? 
What would happen if i drop this database together with postgres user.
-- 
Eimantas Vaičiūnas
VU Skaičiavimo centras



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database
  2005-03-10 08:17 template1 database Eimantas Vaičiūnas <eimantas.vaiciunas@sc.vu.lt>
@ 2005-03-10 06:36 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 8+ messages in thread

From: Tom Lane @ 2005-03-10 06:36 UTC (permalink / raw)
  To: eimantas.vaiciunas@sc.vu.lt; +Cc: pgsql-admin

Eimantas =?utf-8?q?Vai=C4=8Di=C5=ABnas?= <eimantas.vaiciunas@sc.vu.lt> writes:
> Just been wondering how important is template1 database to PgSQL? 

The database server itself doesn't care, but there are enough
client-side tools that assume template1 exists that you would not
find life pleasant if you do this.

> What would happen if i drop this database together with postgres user.

The root user does not have to be named "postgres", but you do have to
have a root user.  What exactly do you think will be accomplished by
removing the postgres user?

If you are just idly searching for ways to break your database, try
removing some of the builtin datatypes from pg_type, or builtin
functions from pg_proc, etc ...

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: template1 database
  2005-03-10 08:17 template1 database Eimantas Vaičiūnas <eimantas.vaiciunas@sc.vu.lt>
@ 2005-03-10 07:20 ` Michael Fuhr <mike@fuhr.org>
  1 sibling, 0 replies; 8+ messages in thread

From: Michael Fuhr @ 2005-03-10 07:20 UTC (permalink / raw)
  To: Eimantas Vai??i??nas <eimantas.vaiciunas@sc.vu.lt>; +Cc: pgsql-admin

On Thu, Mar 10, 2005 at 08:17:03AM +0000, Eimantas Vai??i??nas wrote:

> I've recently started using PgSQL and i must say it gose quite good as far as 
> i can say. Just been wondering how important is template1 database to PgSQL? 
> What would happen if i drop this database together with postgres user.

See "Template Databases" in the "Managing Databases" chapter of the
documentation, as well as the "Database Users and Privileges" chapter:

http://www.postgresql.org/docs/8.0/interactive/manage-ag-templatedbs.html
http://www.postgresql.org/docs/8.0/interactive/user-manag.html

Is there a reason you're thinking about dropping template1 and the
postgres user?

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2005-03-10 08:17 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-08-20 19:03 template1 database... Thomas LeBlanc <thomasatiem@hotmail.com>
2003-08-20 19:46 ` Devrim GUNDUZ <devrim@gunduz.org>
2003-08-23 16:38   ` Chris M <chris@none.none>
2003-08-25 15:19     ` Bruno Wolff III <bruno@wolff.to>
2003-08-25 15:51       ` Chris M <chris@none.none>
2005-03-10 08:17 template1 database Eimantas Vaičiūnas <eimantas.vaiciunas@sc.vu.lt>
2005-03-10 06:36 ` Re: template1 database Tom Lane <tgl@sss.pgh.pa.us>
2005-03-10 07:20 ` Re: template1 database Michael Fuhr <mike@fuhr.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox