For the record,  the relevant trunk server revision is r.3619 revid:
[email protected]

-- 
You received this bug notification because you are a member of OpenERP
CTP, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/600964

Title:
  using "search" orm method querying uppercase columns, produces
  PostgreSQL error "column TABLE.COLUMN does not exist"

Status in OpenERP Server:
  Fix Released

Bug description:
  Using upper case field name causes PostgreSQL error while searching
  it.

  For instance, if you create a new object "custom.object" with an integer 
field "FIELD" and try searching it with
  self.pool.get('custom.object').search(cr, uid, [('FIELD', '=', 1)])
  PostgreSQL will tell "ERROR:  column custom_object.field does not exist".

  According to PostgreSQL documentation
  http://www.postgresql.org/docs/8.4/static/sql-syntax-lexical.html ,
  "unquoted names are always folded to lower case. For example, the
  identifiers FOO, foo, and "foo" are considered the same by PostgreSQL,
  but "Foo"  and "FOO" are different from these three and each other"

  By first analysis, I solved modifying the "__leaf_to_sql" method of 
"expression" class ( 
http://bazaar.launchpad.net/~openerp/openobject-server/trunk/annotate/2458/bin/osv/expression.py#L342
 ) replacing every
  %s.%s
  with
  "%s"."%s"

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/600964/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to