Escaping list of numbers for Postgres column names

andydtaylor at gmail.com andydtaylor at gmail.com
Sat Feb 23 13:40:39 EST 2013


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



More information about the Python-list mailing list