Re: How to use as Functional Index to be used as Primary KEY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Janning Vygen <vygen(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to use as Functional Index to be used as Primary KEY
Date: 2004-07-31 15:13:57
Message-ID: 20337.1091286837@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Janning Vygen <vygen(at)gmx(dot)de> writes:
> So here is my question: How can i define a functional index to be used
> with a primary key (using postgreSQL 7.4.3)?

You can't. The SQL spec says that primary keys are columns or lists of
columns.

I don't see any particular difference between a primary key and a unique
index, anyway, except that the primary key is the default target for
foreign-key references.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Lester 2004-07-31 16:25:55 shared_buffers Question
Previous Message Tom Lane 2004-07-31 15:09:35 Re: Correct escaping of untrusted data