Thread: unknown index

unknown index

From
Jodi Kanter
Date:
I am working with a database that was not created by our team. There are
some indexes set up on a table and I need to understand what type they are
and how they are functioning.
How can I look at this in Postgres?
I have a situation where we trying to update data and are receiving an error
based on this index but I have no idea how it was set up.
Thanks
Jodi



Re: unknown index

From
"Nick Fankhauser"
Date:
This my be simpler than the answer you were after, but...

If you're getting something like "cannot insert duplicate key into unique
index fred", you could type: "\d fred" at a psql prompt to learn what
column(s) fred refers to. You can learn even more by digging into the system
tables, but I'll leave that version of the answer to the smarter folk.

-Nick


> -----Original Message-----
> From: pgsql-admin-owner@postgresql.org
> [mailto:pgsql-admin-owner@postgresql.org]On Behalf Of Jodi Kanter
> Sent: Monday, January 07, 2002 4:25 PM
> To: Postgres Admin List
> Subject: [ADMIN] unknown index
>
>
> I am working with a database that was not created by our team. There are
> some indexes set up on a table and I need to understand what type they are
> and how they are functioning.
> How can I look at this in Postgres?
> I have a situation where we trying to update data and are
> receiving an error
> based on this index but I have no idea how it was set up.
> Thanks
> Jodi
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: unknown index

From
Peter Eisentraut
Date:
Jodi Kanter writes:

> I am working with a database that was not created by our team. There are
> some indexes set up on a table and I need to understand what type they are
> and how they are functioning.
> How can I look at this in Postgres?

\d tablename or \d indexname in psql.

--
Peter Eisentraut   peter_e@gmx.net