From: | "Alejandro Michelin Salomon \( Adinet \)" <alejmsg(at)adinet(dot)com(dot)uy> |
---|---|
To: | "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "Pgsql-General" <pgsql-general(at)postgresql(dot)org> |
Subject: | RES: PK with an expression in field list |
Date: | 2006-05-25 00:10:34 |
Message-ID: | !~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAhx491Ki2tUS42D/aMPFg1MKAAAAQAAAAwVbit/EYYUGxaV4ufPE72wEAAAAA@adinet.com.uy |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi :
I will create a unique index, and make this fiels not null.
Thanks for the reply.
Alejandro Michelin Salomon
-->-----Mensagem original-----
-->De: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
-->Enviada em: quarta-feira, 24 de maio de 2006 16:45
-->Para: Alejandro Michelin Salomon ( Adinet )
-->Cc: Pgsql-General
-->Assunto: Re: [GENERAL] PK with an expression in field list
-->
-->
-->"Alejandro Michelin Salomon \( Adinet \)"
--><alejmsg(at)adinet(dot)com(dot)uy> writes:
-->> 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.
-->
-->You can't define a primary key on an expression. The SQL
-->standard says so, and even if we wanted to generalize the
-->standard here, we'd have a bit of a problem with how it'd
-->show up in the information_schema.
-->
-->You can, however, create a unique index over those values
-->and get pretty much the same effect.
-->
--> regards, tom lane
-->
-->
-->--
-->No virus found in this incoming 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 incoming 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
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | ljb | 2006-05-25 00:42:00 | 8.1.4: Who says "PHP deprecated addslashes since 4.0"? |
Previous Message | Dann Corbit | 2006-05-24 23:49:43 | Re: compiling source code!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |