I can be a BUG?

Lists: pgsql-sql
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>
Cc: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>, "sara(at)conectiva(dot)com(dot)br" <sara(at)conectiva(dot)com(dot)br>, "sarafabiana(at)starmedia(dot)com" <sarafabiana(at)starmedia(dot)com>
Subject: Re: I can be a BUG?
Date: 2000-12-01 23:00:42
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

It kinda sounds like your wife created those tables in template1.

Duplicating template1's contents into new databases isn't a bug,
it's a feature ;-)

You can get rid of the tables by manually deleting them in template1.
However, if you don't have any useful data in the installation at all,
an initdb would be easier...

regards, tom lane


From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>, "sara(at)conectiva(dot)com(dot)br" <sara(at)conectiva(dot)com(dot)br>, "sarafabiana(at)starmedia(dot)com" <sarafabiana(at)starmedia(dot)com>
Subject: Re: I can be a BUG?
Date: 2000-12-01 23:25:36
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

Tom Lane wrote:
>
> It kinda sounds like your wife created those tables in template1.
>
> Duplicating template1's contents into new databases isn't a bug,
> it's a feature ;-)

I've seen this behaviour too. Yesterday I pg_dumpall my 7.01 db
compiled from scratch and loaded in PG 7.02 installed from Debian
packages (I know a pg_dumpall wasn't needed, but I did it anyway).
When I went into psql, I was some of my databases with all the pg_*
tables. Why? Also, if I dropdb the database and createdb it again, it's
as if I never deleted it. Is that normal/bug/feature? Why?

-Roberto

P.S: It's nice to see some Brazilians on the list :) I am from Brazil
too. I hope Conectiva is promoting PostgreSQL down there.
--
Computer Science Utah State University
Space Dynamics Laboratory Web Developer
USU Free Software & GNU/Linux Club http://fslc.usu.edu
My home page - http://www.brasileiro.net/roberto


From: "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>
To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>, "sara(at)conectiva(dot)com(dot)br" <sara(at)conectiva(dot)com(dot)br>, "sarafabiana(at)starmedia(dot)com" <sarafabiana(at)starmedia(dot)com>
Subject: I can be a BUG?
Date: 2000-12-01 23:48:44
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

Hi all,

My wife is working on a university graduate project with PHP
and PostgreSQL. She used ERWin to model the tables and exported the
model into ASCII file with a set of SQL commands to create the tables
(with a short corrections of types).

Whe she tried to import into PostgreSQL, using pgsql and "\i"
command, it create about 95% of the tables. The others wasn't created
because she forgot change the type of some fields.

To delete the tables, I sugest to drop the database and create
it again. She droped the database and, when she created the new one,
all tables was there. We repeat this process some times and it can't
create a empty database.

Even on a new, uncreated, with another name, database, all the
tables of the problematic database was there. Can anyone explain if we
are making somethink wrong or this is a BUG?

We using PostgreSQL 7.0.3. under Conectiva Linux 5.0. I'm
sending the ASCII script attached.

PS.: Sara, sorry if you receive more than one copy of this mensage, but
I was uncertain about you correct e-mail address.

Thank's and "Feliz Natal" to all,

[]'s

Edipo Elder F. de Melo

Attachment Content-Type Size
TESTE.ZIP application/octet-stream 5.1 KB

From: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
To: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>, "sara(at)conectiva(dot)com(dot)br" <sara(at)conectiva(dot)com(dot)br>, "sarafabiana(at)starmedia(dot)com" <sarafabiana(at)starmedia(dot)com>
Subject: Re: I can be a BUG?
Date: 2000-12-02 03:27:06
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

On Fri, Dec 01, 2000 at 04:25:36PM -0700, Roberto Mello wrote:
> Tom Lane wrote:
> >
> > It kinda sounds like your wife created those tables in template1.
> >
> > Duplicating template1's contents into new databases isn't a bug,
> > it's a feature ;-)
>
> I've seen this behaviour too. Yesterday I pg_dumpall my 7.01 db
> compiled from scratch and loaded in PG 7.02 installed from Debian
> packages (I know a pg_dumpall wasn't needed, but I did it anyway).
> When I went into psql, I was some of my databases with all the pg_*
> tables. Why? Also, if I dropdb the database and createdb it again, it's
> as if I never deleted it. Is that normal/bug/feature? Why?
>

Ah, the Debian PostgreSQL package uses a different default convention with
psql than a from source compile: if you don't provide a database name,
debian psql will connect you to template1. On a from source compile,
it'll try to connect to a database that matches your username.

Ross


From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>, pgsql-sql <pgsql-sql(at)postgresql(dot)org>, "sara(at)conectiva(dot)com(dot)br" <sara(at)conectiva(dot)com(dot)br>, "sarafabiana(at)starmedia(dot)com" <sarafabiana(at)starmedia(dot)com>
Subject: Re: I can be a BUG?
Date: 2000-12-02 06:09:04
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

"Ross J. Reedstrom" wrote:

> > When I went into psql, I was some of my databases with all the pg_*
> > tables. Why? Also, if I dropdb the database and createdb it again, it's
> > as if I never deleted it. Is that normal/bug/feature? Why?
> >
>
> Ah, the Debian PostgreSQL package uses a different default convention with
> psql than a from source compile: if you don't provide a database name,
> debian psql will connect you to template1. On a from source compile,
> it'll try to connect to a database that matches your username.

Bit I did specify my database name.

-Roberto

--
Computer Science Utah State University
Space Dynamics Laboratory Web Developer
USU Free Software & GNU/Linux Club http://fslc.usu.edu
My home page - http://www.brasileiro.net/roberto


From: "Edipo E(dot) F(dot) Melo" <edipoelder(at)ig(dot)com(dot)br>
To: "pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: I can be a BUG?
Date: 2000-12-02 15:20:04
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-sql

On Fri, 01 Dec 2000 18:00:42 -0500, Tom Lane wrote:

>It kinda sounds like your wife created those tables in template1.
>
>Duplicating template1's contents into new databases isn't a bug,
>it's a feature ;-)

That's it! I didn't see she created on template1 and on project
database too. Thank's for help!

[]'s

Edipo Elder F. de Melo