Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #39696
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-02-23 10:40 -0800 |
| References | <9f33141f-7cca-4f67-b030-bf16dda778fb@googlegroups.com> |
| Message-ID | <bda02f99-ba2c-4b37-8953-bef1db336650@googlegroups.com> (permalink) |
| Subject | Re: Escaping list of numbers for Postgres column names |
| From | andydtaylor@gmail.com |
In reply to my own question, postgres column names must begin with a letter or an underscore. So this is what I have done:
>>> for row in cursor_from:
... if row[8]:
... stn_list_short.append("_" + row[0])
I can now use stn_list_short to create my columns
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Escaping list of numbers for Postgres column names andydtaylor@gmail.com - 2013-02-23 03:55 -0800 Re: Escaping list of numbers for Postgres column names andydtaylor@gmail.com - 2013-02-23 10:40 -0800
csiph-web