Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#817 closed defect (duplicate)

problem with column-quoting and "computed columns"

Reported by: hugo Owned by: Adrian Holovaty
Component: Metasystem Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by hugo)

When using the registered comments, an SQL is build that produces the following error:

ProgrammingError at /forum/technik/waschmaschinen/miele-superfix/discussion/
ERROR: column "SELECT COUNT(*) FROM comments_karma WHERE comments_karma.commen" does not exist SELECT "comments"."id","comments"."user_id","comments"."content_type_id","comments"."object_id","comments"."headline","comments"."comment","comments"."rating1","comments"."rating2","comments"."rating3","comments"."rating4","comments"."rating5","comments"."rating6","comments"."rating7","comments"."rating8","comments"."valid_rating","comments"."submit_date","comments"."is_public","comments"."ip_address","comments"."is_removed","comments"."site_id","auth_users"."id","auth_users"."username","auth_users"."first_name","auth_users"."last_name","auth_users"."email","auth_users"."password_md5","auth_users"."is_staff","auth_users"."is_active","auth_users"."is_superuser","auth_users"."last_login","auth_users"."date_joined","content_types"."id","content_types"."name","content_types"."package","content_types"."python_module_name","packages"."label","packages"."name","sites"."id","sites"."domain","sites"."name",("SELECT COUNT(*) FROM comments_karma WHERE comments_karma.comment_id=comments.id AND score=1") AS "_karma_total_good",("SELECT COUNT(*) FROM comments_karma WHERE comments_karma.comment_id=comments.id AND score=-1") AS "_karma_total_bad" FROM "comments","content_types" "t1","content_types" "t5","auth_users","content_types","packages","sites" WHERE "comments"."content_type_id" = "t1"."id" AND "comments"."content_type_id" = "t5"."id" AND "t1"."package" = 'forum' AND "comments"."site_id" = 1 AND "comments"."object_id" = 3 AND "t5"."python_module_name" = 'groups' AND "comments"."user_id" = "auth_users"."id" AND "comments"."content_type_id" = "content_types"."id" AND "content_types"."package" = "packages"."label" AND "comments"."site_id" = "sites"."id" ORDER BY "comments"."submit_date" ASC

This looks like there is column-quoting even done on computed columns like inner selects.

Change History (2)

comment:1 by hugo, 18 years ago

Description: modified (diff)

comment:2 by rjwittams, 18 years ago

Component: Admin interfaceMetasystem
Resolution: duplicate
Status: newclosed

Same as #815

Note: See TracTickets for help on using tickets.
Back to Top