Skip to content

App doesn't work with a PostgreSQL backend #2

Description

@colwin

I am trying to use your app with a PostgreSQL backend.
From the looks of the problem PostgreSQL doesn't support the REPLACE sql command. Here is a log of the unit test run

No fixtures found.
.FEFEE
======================================================================
ERROR: test_get_n_tickets (ticketing.tests.tests.TicketingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/tests/tests.py", line 27, in test_get_n_tickets
    t0 = get_ticket()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/models.py", line 85, in get_ticket
    ticket = ticketing_models[sequence].objects.create()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/managers.py", line 7, in create
    id = self.get_ticket()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/managers.py", line 23, in get_ticket
    result = cursor.execute(sql, [self.model.STUB_DEFAULT])
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
DatabaseError: syntax error at or near "REPLACE" at character 1


======================================================================
ERROR: test_get_ticket (ticketing.tests.tests.TicketingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/tests/tests.py", line 11, in test_get_ticket
    t = get_ticket()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/models.py", line 85, in get_ticket
    ticket = ticketing_models[sequence].objects.create()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/managers.py", line 7, in create
    id = self.get_ticket()
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django_ticketing-0.6.2-py2.7.egg/ticketing/managers.py", line 23, in get_ticket
    result = cursor.execute(sql, [self.model.STUB_DEFAULT])
  File "/opt/race/share/sw/os/Linux_2.6_libc2.5_i686/python/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
DatabaseError: syntax error at or near "REPLACE" at character 1

Are you planning to support PostgreSQL as a backend? The documentation for your app says that it works on all backends that Django supports.

Version Information
PostgreSQL version
        PostgreSQL 8.1.18 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-46)
Django Version
      1.2.5

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions