Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #26105 > unrolled thread
| Started by | Emile van Sebille <emile@fenx.com> |
|---|---|
| First post | 2012-07-26 11:10 -0700 |
| Last post | 2012-07-26 11:10 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Generating valid identifiers Emile van Sebille <emile@fenx.com> - 2012-07-26 11:10 -0700
| From | Emile van Sebille <emile@fenx.com> |
|---|---|
| Date | 2012-07-26 11:10 -0700 |
| Subject | Re: Generating valid identifiers |
| Message-ID | <mailman.2620.1343326094.4697.python-list@python.org> |
On 7/26/2012 5:26 AM Laszlo Nagy said... > I have a program that creates various database objects in PostgreSQL. > There is a DOM, and for each element in the DOM, a database object is > created (schema, table, field, index and tablespace). > > I do not want this program to generate very long identifiers. It would > increase SQL parsing time, and don't look good. Let's just say that the > limit should be 32 characters. But I also want to recognize the > identifiers when I look at their modified/truncated names. I had a similar problem with one customer where their legacy green screen app allowed only 40 characters max for the product description, but the marketing description lengths routinely ran out to 75 or so characters. In that situation I reviewed the source marketing descriptions and prepped a utility to translate common longer words or phrases to one of a selection of shortened abbreviations. I then cycled through best fitting substitutions to get as close as reasonable to the 40 character limit which generally resulted in recognizable descriptions in the legacy environment that matched by being directly derived from the longer marketing names. YMMV, Emile
Back to top | Article view | comp.lang.python
csiph-web