From: | David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> |
---|---|
To: | "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com> |
Cc: | David Fetter <david(at)fetter(dot)org>, Ben <bench(at)silentmedia(dot)com>, Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: database constraints |
Date: | 2004-10-07 04:47:55 |
Message-ID: | 4164CA7B.9070806@zara.6.isreserved.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Joshua D. Drake wrote:
>> This brings up an interesting idea. What if it were possible to set
>> some kind of rules on DDL at database creation time? For example, I'd
>> like to be able to throw an error if somebody tries to name an object
>> any of the SQL keywords.
>>
>> Other possible rules:
>>
>> * Every table must have a comment
>> * noCamelCaps
>> * downcase all entities
>> * underbar_separators_required
>> * abbrev_w_beg, nt_by_rmvng_vwls
>> * Your favorite algorithmic coding standard here
>
> Hmmm.. like a PostgreSQL syntax mode... in the PostgreSQL.conf:
>
> syntax_mode = lazy, standard, strict
>
> Where lazy is the current , standard would throw exceptions if you try
> to use a reserved word or use uppercase, and strict would do things like
> force a comment.
I'd much prefer if PostgreSQL had a generalized event or trigger system.
That way, one can install a trigger (or a plugin, or whatever) to trap
CREATE TABLE, CREATE VIEW, etc.
IMO, your proposed solution is too specific. There are too many coding
styles that people might want to enforce in their environment.
--
dave
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-10-07 04:52:50 | Re: Postgres 8.0 + JDBC |
Previous Message | David Garamond | 2004-10-07 04:43:56 | Re: database constraints |
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2004-10-07 05:23:56 | Re: libpq and prepared statements progress for 8.0 |
Previous Message | David Garamond | 2004-10-07 04:43:56 | Re: database constraints |