Thread: Problems with \dt
Hello, I use postgreSQL 6.3. Have a look at this (after running psql): ===================================== mydb=> vacuum; VACUUM mydb=> create table mytable (number int); CREATE mydb=> insert into mytable values(12); INSERT 18711 1 mydb=> insert into mytable values(13); INSERT 18712 1 mydb=> select * from mytable; number ------ 12 13 (2 rows) mydb=> \d mytable; Table = mytable +--------------+----------+-------+ | Field | Type | Length| +--------------+----------+-------+ | number | int4 | 4 | +--------------+----------+-------+ mydb=> \dt Couldn't find any tables! mydb=> =============================================== (I made the above drawn table a little thiner to make it easier to view) My answers are: 1.Why can't \dt see any tables? 2.I also can't see the tables using ODBC in Access97 (in Win95OSR). My driver is psqlODBC 6.30. There is no problem with authorisation and queries like select or insert. Can anyone tell me where the point is or where I can find the answer? I went through all available documentation and was not able to solve it. I work on SunOS 5.5.1. I have never used name 'mytable' before. The binaries were got from ftp://xenium.pdi.net/pub/PostgreSQL/bindist/PostgreSQL-v6_3-Solaris_v2_6.gz Thanks in advance Wojtek Pietron
[Charset iso-8859-2 unsupported, filtering to ASCII...] > Hello, > I use postgreSQL 6.3. Have a look at this (after running psql): > > ===================================== > mydb=> vacuum; > VACUUM > mydb=> create table mytable (number int); > CREATE > mydb=> insert into mytable values(12); > INSERT 18711 1 > mydb=> insert into mytable values(13); > INSERT 18712 1 > mydb=> select * from mytable; > number > ------ > 12 > 13 > (2 rows) > > mydb=> \d mytable; > > Table = mytable > +--------------+----------+-------+ > | Field | Type | Length| > +--------------+----------+-------+ > | number | int4 | 4 | > +--------------+----------+-------+ > mydb=> \dt > Couldn't find any tables! > mydb=> > =============================================== > (I made the above drawn table a little thiner to > make it easier to view) Strange. I recommend you pull the \dt query out of the psql.c source file, and try it in psql to see what is failing. Could be a problem that you can't read pg_passwd, which you should be able to do. \dt needs to find the owner of the table to succeed. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)