Обсуждение: Newbie questions

Поиск
Список
Период
Сортировка

Newbie questions

От
"berbo"
Дата:
Hi

3 questions from a newbie with the new version 8.0 with Windows

1.Inside directory where is the database is it possible to have name instead
of numbers for the names of tables?

2. How to do a new, or different, directory of database?

3. Is it possible to share the same table between 2 or more databases?


Thanks in advance




---
Certifié sans virus. Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.854 / Virus Database: 582 - Release Date: 2005-02-04



Re: Newbie questions

От
"Dave Page"
Дата:

> -----Original Message-----
> From: pgadmin-support-owner@postgresql.org
> [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of berbo
> Sent: 08 February 2005 13:55
> To: pgadmin-support@postgresql.org
> Subject: [pgadmin-support] Newbie questions
>
> Hi

Hi,

These questions should really be directed to a postgresql list
(http://www.postgresql.org/community/lists), however I have a couple of
minutes...

> 3 questions from a newbie with the new version 8.0 with Windows
>
> 1.Inside directory where is the database is it possible to
> have name instead
> of numbers for the names of tables?

No. The numbers are the filenode numbers for the index or relation and
cannot be changed. Why would you want to anyway?

> 2. How to do a new, or different, directory of database?

Create a new tablespace in pgAdmin or psql, and when you create tables
or indexes, select the appropriate tablespace. This is obviously useful
to spread the load across multiple disks.

> 3. Is it possible to share the same table between 2 or more databases?

Not without hacking source code :-).

The recommended way to do what you are probably trying to achieve is to
create one database with multiple schemas in it. This allows you to
separate objects into the schemas (which may have different
owners/permissions), and execute cross-schema queries when required (eg.
SELECT * FROM schema1.table, schema2.table...).

Regards, Dave.