Обсуждение: A patch that adds primary key and unique key support to psql's \d

Поиск
Список
Период
Сортировка

A patch that adds primary key and unique key support to psql's \d

От
"Christopher Kings-Lynne"
Дата:
This just breaks down the indices in to three groups:

non-unique: stay as they were
unique and primary: become listed as primary keys
unique and non-primary: become listed as unique keys

I also made it so that it shows the names of check constraints ie:

Check: "$1" (a > 5)

Chris

Вложения

Re: A patch that adds primary key and unique key support to psql's \d

От
Bruce Momjian
Дата:
Patch applied.

Christopher, can you post a sample of the new output.  Also, does this
affect the psql docs at all?


Thanks.


[ Charset ISO-8859-1 unsupported, converting... ]
> This just breaks down the indices in to three groups:
>
> non-unique: stay as they were
> unique and primary: become listed as primary keys
> unique and non-primary: become listed as unique keys
>
> I also made it so that it shows the names of check constraints ie:
>
> Check: "$1" (a > 5)
>
> Chris

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

RE: A patch that adds primary key and unique key support to psql's \d

От
"Christopher Kings-Lynne"
Дата:
Sample output that appears below the table attributes for \d:

Indicies: palm_buy_date_idx
          palm_user_date_idx
Primary Key: palm_buyers_pkey
Unique Key: palm_buyers_username
Constraint: "$1" ((sex = 'M'::bpchar) OR (sex = 'F'::bpchar))

Note that check constraint name now shown as well.  (Makes it a lot easier
to test inheritance support in ADD/DROP constraint :) )

Attached is a docs change for psql.

Chris

> -----Original Message-----
> From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> Sent: Monday, 28 May 2001 9:56 AM
> To: Christopher Kings-Lynne
> Cc: Patches
> Subject: Re: [PATCHES] A patch that adds primary key and unique key
> support to psql's \d
>
>
> Patch applied.
>
> Christopher, can you post a sample of the new output.  Also, does this
> affect the psql docs at all?
>
>
> Thanks.
>
>
> [ Charset ISO-8859-1 unsupported, converting... ]
> > This just breaks down the indices in to three groups:
> >
> > non-unique: stay as they were
> > unique and primary: become listed as primary keys
> > unique and non-primary: become listed as unique keys
> >
> > I also made it so that it shows the names of check constraints ie:
> >
> > Check: "$1" (a > 5)
> >
> > Chris
>
> [ Attachment, skipping... ]
>
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 5: Have you checked our extensive FAQ?
> >
> > http://www.postgresql.org/users-lounge/docs/faq.html
>
> --
>   Bruce Momjian                        |  http://candle.pha.pa.us
>   pgman@candle.pha.pa.us               |  (610) 853-3000
>   +  If your life is a hard drive,     |  830 Blythe Avenue
>   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
>

Вложения

Re: A patch that adds primary key and unique key support to psql's \d

От
Bruce Momjian
Дата:
Patch applied.

> Sample output that appears below the table attributes for \d:
>
> Indicies: palm_buy_date_idx
>           palm_user_date_idx
> Primary Key: palm_buyers_pkey
> Unique Key: palm_buyers_username
> Constraint: "$1" ((sex = 'M'::bpchar) OR (sex = 'F'::bpchar))
>
> Note that check constraint name now shown as well.  (Makes it a lot easier
> to test inheritance support in ADD/DROP constraint :) )
>
> Attached is a docs change for psql.
>
> Chris
>
> > -----Original Message-----
> > From: Bruce Momjian [mailto:pgman@candle.pha.pa.us]
> > Sent: Monday, 28 May 2001 9:56 AM
> > To: Christopher Kings-Lynne
> > Cc: Patches
> > Subject: Re: [PATCHES] A patch that adds primary key and unique key
> > support to psql's \d
> >
> >
> > Patch applied.
> >
> > Christopher, can you post a sample of the new output.  Also, does this
> > affect the psql docs at all?
> >
> >
> > Thanks.
> >
> >
> > [ Charset ISO-8859-1 unsupported, converting... ]
> > > This just breaks down the indices in to three groups:
> > >
> > > non-unique: stay as they were
> > > unique and primary: become listed as primary keys
> > > unique and non-primary: become listed as unique keys
> > >
> > > I also made it so that it shows the names of check constraints ie:
> > >
> > > Check: "$1" (a > 5)
> > >
> > > Chris
> >
> > [ Attachment, skipping... ]
> >
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 5: Have you checked our extensive FAQ?
> > >
> > > http://www.postgresql.org/users-lounge/docs/faq.html
> >
> > --
> >   Bruce Momjian                        |  http://candle.pha.pa.us
> >   pgman@candle.pha.pa.us               |  (610) 853-3000
> >   +  If your life is a hard drive,     |  830 Blythe Avenue
> >   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
> >

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026