From: | "paul butler" <paul(at)entropia(dot)co(dot)uk> |
---|---|
To: | Wolfgang Draxinger <wdraxinger(at)darkstargames(dot)de> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Migration from MySQL, some difficulties with DESCRIBE and SHOW |
Date: | 2003-08-04 07:13:00 |
Message-ID: | 3F2E158C.15329.50CE552@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Date sent: Sun, 03 Aug 2003 21:44:04 +0200
From: Wolfgang Draxinger <wdraxinger(at)darkstargames(dot)de>
To: pgsql-novice(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Marcin Gil | 2003-08-04 07:49:11 | Re: pg 7.2.3 -> pg 7.3.3: pg_atoi error |
Previous Message | Eric Johnson | 2003-08-03 20:32:47 | Re: Migration from MySQL, some difficulties with DESCRIBE and SHOW |