pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feednaming conventions constraint
3+ messages / 2 participants
[nested] [flat]
* naming conventions constraint
@ 2003-10-23 20:30 Julian North <julian@mulberryst.co.uk>
0 siblings, 1 reply; 3+ messages in thread
From: Julian North @ 2003-10-23 20:30 UTC (permalink / raw)
To: pgsql-sql
I'm at the very beginning of working with postgres.
The aim is to replace / build a number of very large and very complex
database currently residing in Oracle, MSSQL and Informix.
In order to coordinate across a medium size DBA team I instituted a standard
constraint naming convention suitable for the above 3 platforms.
For example a foreign key would be FK_table#reftable#column.
Unfortunately I don't appear to be able to use it with postgres.
This is because I can't use the # character in constraint names.
Does anybody have any suggestions as to an alternative that is also a single
char? (I'm limited to 30 chars cos of oracle and manyof the current names at
the limit).
Any help appreciated,
Julian.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: naming conventions constraint
@ 2003-10-24 18:01 Rod Taylor <rbt@rbt.ca>
parent: Julian North <julian@mulberryst.co.uk>
0 siblings, 1 reply; 3+ messages in thread
From: Rod Taylor @ 2003-10-24 18:01 UTC (permalink / raw)
To: Julian North <julian@mulberryst.co.uk>; +Cc: pgsql-sql
rbt=# create table bob_is(your_uncle integer, constraint
"bob_is#your_uncle" check(true));
CREATE TABLE
rbt=# \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.
>
> The aim is to replace / build a number of very large and very complex
> database currently residing in Oracle, MSSQL and Informix.
>
> In order to coordinate across a medium size DBA team I instituted a standard
> constraint naming convention suitable for the above 3 platforms.
>
> For example a foreign key would be FK_table#reftable#column.
>
> Unfortunately I don't appear to be able to use it with postgres.
>
> This is because I can't use the # character in constraint names.
>
> Does anybody have any suggestions as to an alternative that is also a single
> char? (I'm limited to 30 chars cos of oracle and manyof the current names at
> the limit).
>
> Any help appreciated,
>
>
>
> Julian.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
Attachments:
signature.asc (application/pgp-signature, 186B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: naming conventions constraint
@ 2003-10-25 09:41 Julian North <julian@mulberryst.co.uk>
parent: Rod Taylor <rbt@rbt.ca>
0 siblings, 0 replies; 3+ messages in thread
From: Julian North @ 2003-10-25 09:41 UTC (permalink / raw)
To: 'Rod Taylor' <rbt@rbt.ca>; +Cc: pgsql-sql
thats just what i needed to know.
many many thanks!
j.
-----Original Message-----
From: Rod Taylor [mailto:rbt@rbt.ca]
Sent: 24 October 2003 19:01
To: Julian North
Cc: pgsql-sql@postgresql.org
Subject: Re: naming conventions constraint
rbt=# create table bob_is(your_uncle integer, constraint
"bob_is#your_uncle" check(true));
CREATE TABLE
rbt=# \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.
>
> The aim is to replace / build a number of very large and very complex
> database currently residing in Oracle, MSSQL and Informix.
>
> In order to coordinate across a medium size DBA team I instituted a
standard
> constraint naming convention suitable for the above 3 platforms.
>
> For example a foreign key would be FK_table#reftable#column.
>
> Unfortunately I don't appear to be able to use it with postgres.
>
> This is because I can't use the # character in constraint names.
>
> Does anybody have any suggestions as to an alternative that is also a
single
> char? (I'm limited to 30 chars cos of oracle and manyof the current names
at
> the limit).
>
> Any help appreciated,
>
>
>
> Julian.
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-10-25 09:41 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-23 20:30 naming conventions constraint Julian North <julian@mulberryst.co.uk>
2003-10-24 18:01 ` Rod Taylor <rbt@rbt.ca>
2003-10-25 09:41 ` Julian North <julian@mulberryst.co.uk>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox