Re: Composite UNIQUE across two tables? - Mailing list pgsql-sql

From Jamie Tufnell
Subject Re: Composite UNIQUE across two tables?
Date
Msg-id b0a4f3350803090827p61b075c0rd27e63c2cb23ab93@mail.gmail.com
Whole thread Raw
In response to Re: Composite UNIQUE across two tables?  ("Jamie Tufnell" <diesql@googlemail.com>)
Responses Re: Composite UNIQUE across two tables?
List pgsql-sql
On 3/7/08, Jamie Tufnell <diesql@googlemail.com> wrote:
> On 3/7/08, Bart Degryse <Bart.Degryse@indicator.be> wrote:
> > I haven't tested these two statements, but I'm using exactly this
> > concept on some tables myself.
> > My equivalent of your users table contains some 3,000,000 records.
> > My equivalent of your sites table contains some 150,000 records.
> > And it works fine...
> When I try to create the index I get the following error:
>
> ERROR: functions in index expression must be marked IMMUTABLE
>
> Out of curiosity, I declared it IMMUTABLE and it worked for the
> purposes of my small, isolated test,.
>
> Am I opening myself up to problems by doing this?

Does anyone have any comment on this?  I've done some more testing and
have yet to run into a problem.

I'd be really interested to hear some opinions on this.

Cheers,
J.


pgsql-sql by date:

Previous
From: Markus Schatten
Date:
Subject: Re: plpythonu + os.spawnv
Next
From: "A. R. Van Hook"
Date:
Subject: Insert problem