From: | "Nat Howard" <Nat(dot)Howard(at)cello-us(dot)com> |
---|---|
To: | <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | RE: [HACKERS] Re: [SQL] Column name's length |
Date: | 1999-06-02 19:23:38 |
Message-ID: | 000101bead2d$6a78fc80$1242abc7@dummy.cello-us.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Just a suggestion: use an printably-encoded version of
md5 or sha, which are cryptographic hash algorithms.
It will make the name completely predictable:
if(too_long(name)) {
name = md5(name);
}
It will be *very* unlikely that there are any collisions.
Of course, a person won't say "gee, party_address_relation_code_types_seq is
too
long, I guess that will turn out to be d4420a3105e98e3e2e12c5c73019db59".
> -----Original Message-----
> From: owner-pgsql-hackers(at)postgreSQL(dot)org
> [mailto:owner-pgsql-hackers(at)postgreSQL(dot)org]On Behalf Of Thomas Lockhart
> Sent: Wednesday, June 02, 1999 12:26 AM
> To: Tom Lane
> Cc: pgsql-hackers(at)postgreSQL(dot)org; Zalman Stern
> Subject: Re: [HACKERS] Re: [SQL] Column name's length
>
>
> > How about something like this: if the code finds that the names are
> > too long when forming an implicit index name, it truncates the names
> > to fit, and you are OK as long as the truncated name is unique.
> > Comments? Objections? I think I could argue that this is a bug fix
> > and deserves to be slipped into 6.5 ;-)
>
> I understand some folks think this is a problem, but have been
> reluctant to include a "randomizer" in the created index name since it
> would make the index name less clearly predictable. May as well use
> something like "idx_<procid>_<timestamp>" or somesuch...
>
> No real objection though, other than aesthetics. And those only count
> for so much...
>
> - Tom
>
> --
> Thomas Lockhart lockhart(at)alumni(dot)caltech(dot)edu
> South Pasadena, California
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Filipi Damasceno Viana | 1999-06-02 20:29:36 | Foreign Key in PostGreSQL |
Previous Message | Tom Lane | 1999-06-02 19:14:23 | Re: [HACKERS] PID of backend |