Problem with the constraints test and PRIMARY KEY on UnixWare 7.

From: "Billy G(dot) Allie" <Bill(dot)Allie(at)mug(dot)org>
To: hackers(at)postgreSQL(dot)org
Subject: Problem with the constraints test and PRIMARY KEY on UnixWare 7.
Date: 1998-09-08 08:02:52
Message-ID: 199809080802.EAA02997@bgalli.mug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

In the constraints test, a table (primary_tbl) is defined with a primary key.
The table is created, shows up in the list of table using the \dt command, but
does not exist if you use the \d command, or any SQL statement referencing the
table. Here is the output from the \dt and \d command.

regression=>\dt

Database = regression
+------------------+----------------------------------+----------+
| Owner | Relation | Type |
+------------------+----------------------------------+----------+
[...]
| postgres | path_tbl | table |
| postgres | person | table |
| postgres | point_tbl | table |
| postgres | polygon_tbl | table |
| postgres | primary_tbl | table |
| postgres | real_city | table |
| postgres | reltime_tbl | table |
| postgres | road | table |
[...]
+------------------+----------------------------------+----------+
regression=> \d primary_tbl
Couldn't find table primary_tbl!
regression=> \di

Database = regression
+------------------+----------------------------------+----------+
| Owner | Relation | Type |
+------------------+----------------------------------+----------+
| postgres | primary_tbl_pkey | index |
| postgres | unique_tbl_i_key | index |
+------------------+----------------------------------+----------+
regression=> \d primary_tbl_pkey

Table = primary_tbl_pkey
+----------------------------------+----------------------------+-------+
| Field | Type | Length|
+----------------------------------+----------------------------+-------+
| i | int4 | 4 |
+----------------------------------+----------------------------+-------+
regression=>

The problem seems to be restrict to the use of PRIMARY KEY, since unique_table
works fine.

And here is the relavent portions from test output.

QUERY: CREATE TABLE PRIMARY_TBL (i int PRIMARY KEY, t text);
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
primary_tbl_pkey for table primary_tbl
QUERY: INSERT INTO PRIMARY_TBL VALUES (1, 'one');
ERROR: primary_tbl: Table does not exist.
QUERY: INSERT INTO PRIMARY_TBL VALUES (2, 'two');
ERROR: primary_tbl: Table does not exist.
[...]
QUERY: SELECT '' AS four, * FROM PRIMARY_TBL;
ERROR: primary_tbl: Table does not exist.
QUERY: DROP TABLE PRIMARY_TBL;
ERROR: Relation primary_tbl Does Not Exist!
QUERY: CREATE TABLE PRIMARY_TBL (i int, t text, PRIMARY KEY(i,t));
NOTICE: CREATE TABLE/PRIMARY KEY will create implicit index
primary_tbl_pkey for table primary_tbl
ERROR: cannot create primary_tbl
QUERY: INSERT INTO PRIMARY_TBL VALUES (1, 'one');
ERROR: primary_tbl: Table does not exist.
QUERY: INSERT INTO PRIMARY_TBL VALUES (2, 'two');
ERROR: primary_tbl: Table does not exist.
[...]
QUERY: SELECT '' AS three, * FROM PRIMARY_TBL;
ERROR: primary_tbl: Table does not exist.
QUERY: DROP TABLE PRIMARY_TBL;
ERROR: Relation primary_tbl Does Not Exist!

Any help would be appreciated.
Thanks.
--
____ | Billy G. Allie | Domain....: Bill(dot)Allie(at)mug(dot)org
| /| | 7436 Hartwell | Compuserve: 76337,2061
|-/-|----- | Dearborn, MI 48126| MSN.......: B_G_Allie(at)email(dot)msn(dot)com
|/ |LLIE | (313) 582-1540 |

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1998-09-08 08:29:10 Re: [HACKERS] 6.4 Aggregate Bug and HAVING problems...
Previous Message Andreas Zeugswetter 1998-09-08 07:40:30 Re: [HACKERS] 6.4 Aggregate Bug and HAVING problems...