| From: | Joe Conway <mail(at)joeconway(dot)com> |
|---|---|
| To: | Turbo Fredriksson <turbo(at)bayour(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: 'Following' the Primary key |
| Date: | 2002-03-14 17:40:36 |
| Message-ID: | 3C90E094.70402@joeconway.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Turbo Fredriksson wrote:
>>>>>>"Oliver" == Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
>>>>>>
>
> Oliver> On Thu, 2002-03-14 at 13:00, Turbo Fredriksson wrote:
> >> With '\d table' I get the columns, types and modifiers. Also
> >> the Primary key, Indexes etc are shown.
> >>
> >> But if I want to know WHAT the primary key 'is pointing to',
> >> how would I do that (ie, what is the primary key)?
>
> Oliver> Just do \d again on the key index name:
>
> Oliver> bray=# \d org_contact
> Oliver> bray=# \d org_contact_pkey
>
> Cool. Works fine in 7.2, but not 7.1.3 (which we're running on our
> production systems)...
>
> Any idea how to do this on 7.1.3?
>
See:
http://www.brasileiro.net/postgres/cookbook/view-one-recipe.adp?recipe_id=36
for one possible way.
Joe
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dave Cramer | 2002-03-14 17:54:45 | Re: [HACKERS] Bug #613: Sequence values fall back to previously chec |
| Previous Message | Tom Lane | 2002-03-14 17:39:55 | Re: insert statements |