Обсуждение: Use of column names as FK.

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

Use of column names as FK.

От
Anil Jangam
Дата:
Hi,

I a system table of pgSQL "pg_attribute", where the table and their
attributes (rather column names) are stored. Can we use the column (attname,
a column in the pg_attribute table: this contains the column names of all
the tables in the database) name as a FK?? But I am not sure if this is
valid, and allowed in the actual database design. For time being I shall
assume that we can go ahead with use of this system table.

regds,
-anil.

Re: Use of column names as FK.

От
Dave Page
Дата:

> -----Original Message-----
> From: Anil Jangam [mailto:anilj@indts.com]
> Sent: 20 December 2001 05:03
> To: pgsql-cygwin@postgresql.org
> Subject: [CYGWIN] Use of column names as FK.
> Importance: High
>
>
> Hi,
>
> I a system table of pgSQL "pg_attribute", where the table and
> their attributes (rather column names) are stored. Can we use
> the column (attname, a column in the pg_attribute table: this
> contains the column names of all the tables in the database)
> name as a FK?? But I am not sure if this is valid, and
> allowed in the actual database design. For time being I shall
> assume that we can go ahead with use of this system table.

pgAdmin probably won't let you, I would suggest you create a test database
and try it from psql! If it works though, let me know and I'll make pgAdmin
allow it.

You might also get a better answer from pgsql-general@postgresql.org though
as most of the threads on this list are about getting PostgreSQL up and
running on Cygwin rather than actually using it (for which the platform is
normally irrelevant).

Regards, Dave.