Re: Re: Replace MSSQL by PostgreSQL ?

From: 100(dot)179370(at)germanynet(dot)de (Martin Jacobs)
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)postgresql(dot)org>, Pruner Jan <pruner(at)cekia(dot)cz>
Subject: Re: Re: Replace MSSQL by PostgreSQL ?
Date: 2001-06-19 21:13:10
Message-ID: Pine.LNX.4.33.0106192256490.16601-100000@Schnecke.Windsbach.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 18 Jun 2001, Tom Lane wrote:

> 100(dot)179370(at)germanynet(dot)de (Martin Jacobs) writes:
> > On Sat, 16 Jun 2001, Tom Lane wrote:
> >> It might work to rename the type (eg, "update pg_type set typname =
> >> 'pgname' where typname = 'name'). Haven't tried that to see what
> >> sorts of problems it might have. Would definitely recommend doing
> >> any experimentation of this sort in a scratch database ;-)
>
> > I've done such experiment. It does not work, sorry for the
> > noise. :-(
>
> No? What goes wrong?

My PG environment is still 7.03. I did a pg_dump of an
existing small database, consisting of a couple of tables,
sequences and more. I removed the data import from the dump
file, created a new test database, renamed type 'name' to
'pg_name' as you suggested and tried to import the dumpfile
into the new database with

psql -e test < dumpfile

and get the error message

ERROR: Unable to locate type name 'name' in catalog

The first line after the connect command is

CREATE SEQUENCE "anbieter_lieferant_seq" start 61 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;

In the follow up there are more error messages due to the
first error.

My conclusion: there is no simple way to name a table like a
type name.

Right?

>
> > I can understand Pruner, it's a bit disappointing to have
> > 'name' as table name blocked by PG internals, and other rather
> > natural table names too. Is there really no solution?
>
> Once we implement schemas (hopefully Real Soon Now), I'd expect the
> built-in type names to be part of the system schema, where they'd not
> prevent you from creating new table + type names in your own schema.
> Of course, you will still not like what happens after you create a
> table named "text", say ... but as long as you're sufficiently careful
> about qualifying table names and type names it seems like it should
> work.
> ...

Sounds promising, so let's look forward.

Regards

Martin

--
Dipl-Ing. Martin Jacobs * Windsbach * Germany
Registered Linux User #87175, http://counter.li.org/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thalis A. Kalfigopoulos 2001-06-19 22:04:56 postgres.h missing?
Previous Message Peter Eisentraut 2001-06-19 20:51:51 Re: aggregate function for median calculation