X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 71B14D1B8C4 for ; Fri, 24 Oct 2003 18:04:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 39114-10 for ; Fri, 24 Oct 2003 15:03:57 -0300 (ADT) Received: from mail.hive.nj2.inquent.com (mc.carriermail.com [205.178.180.9]) by svr1.postgresql.org (Postfix) with SMTP id 5F98AD1B946 for ; Fri, 24 Oct 2003 15:01:36 -0300 (ADT) Received: (qmail 5685 invoked from network); 24 Oct 2003 18:01:30 -0000 Received: from unknown (HELO ?10.0.2.9?) (216.208.117.7) by 205.178.180.9 with SMTP; 24 Oct 2003 18:01:30 -0000 Subject: Re: naming conventions constraint From: Rod Taylor To: Julian North Cc: pgsql-sql@postgresql.org In-Reply-To: <001901c399a4$92145c40$0401a8c0@ANYAKA> References: <001901c399a4$92145c40$0401a8c0@ANYAKA> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-n117vj1TURXntab1V6xp" Message-Id: <1067018483.81651.58.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Fri, 24 Oct 2003 14:01:24 -0400 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/328 X-Sequence-Number: 15728 --=-n117vj1TURXntab1V6xp Content-Type: text/plain Content-Transfer-Encoding: quoted-printable rbt=3D# create table bob_is(your_uncle integer, constraint "bob_is#your_uncle" check(true)); CREATE TABLE rbt=3D# \d bob_is Table "public.bob_is" Column | Type | Modifiers ------------+---------+----------- your_uncle | integer | Check constraints: "bob_is#your_uncle" CHECK true You need to quote strings which contain special characters. On Thu, 2003-10-23 at 16:30, Julian North wrote: > I'm at the very beginning of working with postgres. >=20 > The aim is to replace / build a number of very large and very complex > database currently residing in Oracle, MSSQL and Informix. >=20 > In order to coordinate across a medium size DBA team I instituted a stand= ard > constraint naming convention suitable for the above 3 platforms. >=20 > For example a foreign key would be FK_table#reftable#column. >=20 > Unfortunately I don't appear to be able to use it with postgres. >=20 > This is because I can't use the # character in constraint names. >=20 > Does anybody have any suggestions as to an alternative that is also a sin= gle > char? (I'm limited to 30 chars cos of oracle and manyof the current names= at > the limit). >=20 > Any help appreciated, >=20 >=20 >=20 > Julian. >=20 >=20 >=20 > ---------------------------(end of broadcast)--------------------------- > TIP 2: you can get off all lists at once with the unregister command > (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) >=20 --=-n117vj1TURXntab1V6xp Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/mWjz6DETLow6vwwRAmIDAKCCVbrct8gI5D+ugQOjYp5pbqmyigCdHG1K EP6a7wbfrPHlg9YvgP0smKY= =sDOL -----END PGP SIGNATURE----- --=-n117vj1TURXntab1V6xp--