Re: PK with an expression in field list

From: Tino Wildenhain <tino(at)wildenhain(dot)de>
To: "Alejandro Michelin Salomon ( Adinet )" <alejmsg(at)adinet(dot)com(dot)uy>
Cc: Pgsql-General <pgsql-general(at)postgresql(dot)org>
Subject: Re: PK with an expression in field list
Date: 2006-05-24 17:20:36
Message-ID: 447495E4.4050908@wildenhain.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alejandro Michelin Salomon ( Adinet ) wrote:
> Hi:
>
> I need create a PK for a table.
> This PK has 3 fields.
> PK is : CONSTRAINT ff_navios PRIMARY KEY ( idempresa, idarmador, UPPER(
> nome ) )
> But seems not work.

This is a useless error report ;) You need to provide the error message
you get. Usually this error message says in plain english (or even plain
spain or something ;) what the problem is anyway :-)

Ah yes, you should use (UPPER(nome)) in the place you wrote UPPER(nome)

> I have and other way to do this ?

> If this fields are not null and i create a unique index in place off pk,
> i have the same effect ?

What is the desired effect? PK is usually implemented as unique index
anyway.
...
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.7.0/346 - Release Date: 23/5/2006
>
>
> ------------------------------------------------------------------------
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.7.0/346 - Release Date: 23/5/2006
>
I'd get rid of those messages. They are useless anyway.

Regards
Tino

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Richard Broersma Jr 2006-05-24 17:48:55 Re: [SQL] (Ab)Using schemas and inheritance
Previous Message Jorge Godoy 2006-05-24 17:10:44 Re: [SQL] (Ab)Using schemas and inheritance