Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'parsing': 0.07; 'lengths': 0.09; 'postgresql.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'index': 0.13; 'component': 0.15; 'dom,': 0.16; 'identifiers.': 0.16; 'limit.': 0.16; 'message-id:@dough.gmane.org': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'wrote:': 0.17; 'element': 0.17; 'creates': 0.18; 'jan': 0.18; 'controlled': 0.22; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'am,': 0.27; 'header:X-Complaints-To:1': 0.28; 'table,': 0.29; 'objects': 0.29; 'field,': 0.30; 'good.': 0.32; 'to:addr:python-list': 0.33; 'there': 0.35; 'received:org': 0.36; 'created': 0.36; 'should': 0.36; 'subject:: ': 0.38; 'object': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'limit': 0.65; 'sum': 0.66; 'increase': 0.72; 'nagy': 0.84; 'received:fios.verizon.net': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: Generating valid identifiers Date: Thu, 26 Jul 2012 10:51:21 -0400 References: <50113768.6070008@shopzeus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 In-Reply-To: <50113768.6070008@shopzeus.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1343314324 news.xs4all.nl 6941 [2001:888:2000:d::a6]:39413 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:26095 On 7/26/2012 8:26 AM, Laszlo Nagy wrote: > 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. If I controlled all the component names, I would try to limit their lengths so that the sum of lengths was limited to the limit. -- Terry Jan Reedy