Changeset 321 for trunk/module/pg.py


Ignore:
Timestamp:
Aug 10, 2007, 11:55:04 AM (12 years ago)
Author:
darcy
Message:

Quote field names in inserts. Add unit test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/module/pg.py

    r320 r321  
    66# Improved by Christoph Zwerschke
    77#
    8 # $Id: pg.py,v 1.53 2007-03-02 20:35:55 cito Exp $
     8# $Id: pg.py,v 1.54 2007-08-10 15:55:04 darcy Exp $
    99#
    1010
     
    420420                        if f != 'oid' and a.has_key(f):
    421421                                t.append(_quote(a[f], fnames[f]))
    422                                 n.append(f)
     422                                n.append('"%s"' % f)
    423423                q = 'INSERT INTO %s (%s) VALUES (%s)' % \
    424424                        (qcl, ','.join(n), ','.join(t))
Note: See TracChangeset for help on using the changeset viewer.