pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How can I Delete/Alter  Unique Constraint
2+ messages / 2 participants
[nested] [flat]

* How can I Delete/Alter  Unique Constraint
@ 2002-08-29 07:42  shreedhar <shreedhar@lucidindia.net>
  0 siblings, 1 reply; 2+ messages in thread

From: shreedhar @ 2002-08-29 07:42 UTC (permalink / raw)
  To: pgsql-admin

Hi All,

How can I delete Unique Constraint/ Alter Unique Constraint.

example

tblStudent
=======
stdid
stdname
classid

previously I gave stdname as UNIQUE
but I need to alter it as UNIQUE (stdname,classid)

Just it is an example, donot ask why not more than one student with same can
exist in one class.

Thanks alot,

With Best Regards,
Sreedhar Bhaskararaju 1,2nd Main Road, KottuGardens, Chennai - 600 085 Ph :
4475111 Email : shreedhar@lucidindia.net




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: How can I Delete/Alter  Unique Constraint
@ 2002-08-29 09:57  Bhuvan A <bhuvansql@linuxfreemail.com>
  parent: shreedhar <shreedhar@lucidindia.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Bhuvan A @ 2002-08-29 09:57 UTC (permalink / raw)
  To: shreedhar <shreedhar@lucidindia.net>; +Cc: pgsql-admin


On Thu, 29 Aug 2002, shreedhar wrote:

> Hi All,
> 
> How can I delete Unique Constraint/ Alter Unique Constraint.
> 
> example
> 
> tblStudent
> =======
> stdid
> stdname
> classid
> 
> previously I gave stdname as UNIQUE
> but I need to alter it as UNIQUE (stdname,classid)
> 

It is this way. Try 
$ drop index stdname_index_name; 
DROP 
$ create unique index stdname_classid_index_name on tblStudent (stdname,
class_id); 
CREATE

If you are unaware of stdname_index_name try
$ \d pg_indexes

for details.

regards,
bhuvaneswaran





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-08-29 09:57 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-29 07:42 How can I Delete/Alter  Unique Constraint shreedhar <shreedhar@lucidindia.net>
2002-08-29 09:57 ` Bhuvan A <bhuvansql@linuxfreemail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox