Re: Migration from MySQL, some difficulties with DESCRIBE and SHOW
От | paul butler |
---|---|
Тема | Re: Migration from MySQL, some difficulties with DESCRIBE and SHOW |
Дата | |
Msg-id | 3F2E158C.15329.50CE552@localhost обсуждение исходный текст |
Ответ на | Migration from MySQL, some difficulties with DESCRIBE and SHOW (Wolfgang Draxinger <wdraxinger@darkstargames.de>) |
Список | pgsql-novice |
Date sent: Sun, 03 Aug 2003 21:44:04 +0200 From: Wolfgang Draxinger <wdraxinger@darkstargames.de> To: pgsql-novice@postgresql.org Subject: [NOVICE] Migration from MySQL, some difficulties with DESCRIBE and SHOW I'm unfamiliar with mysql, but I think what you are looking for in the psql client are these commands SHOW TABLES: \d{t|i|s|v}... list tables/indexes/sequences/views \d will give a list of all of these objects \dt will give a list of only tables mfx=# \d List of relations Name | Type | Owner ------------------+----------+--------------- accent | table | Administrator accenttype | table | Administrator actor | table | Administrator actor_id_seq | sequence | Administrator actoraudio | view | Administrator audio | table | Administrator audiotype | table | Administrator (7 rows) DESCRIBE: (I'm assuming this gives a listing of a table's structure) \d tablename mfx=# \d accent Table "accent" Column | Type | Modifiers ------------+-------------------+----------- accenttype | character varying | not null id | integer | not null Primary key: accent_pkey Triggers: RI_ConstraintTrigger_1673596, RI_ConstraintTrigger_1673602 Hope this helps Paul Butler > I just migrated to PostgreSQL since this offers a few features I needes > ugently, especially subqueries. However I got to stuck with DESCRIBE and > SHOW commands. Are those not avaliable, or have they some special behaviour? > When trying a SHOW TABLES; I just get an error. > > Wolfgang > -- > > > ---------------------------(end of broadcast)--------------------------- > TIP 8: explain analyze is your friend
В списке pgsql-novice по дате отправления: