Problem adding subscriber

5 views
Skip to first unread message

njeudy

unread,
May 21, 2008, 1:43:16 PM5/21/08
to Feedjack
Hello,

I just test feedjack to make my plante site, and I have a probleme:

when I had subscriber, I have this error message:

ProgrammingError at /projets/admin/feedjack/subscriber/add/
ERREUR: l'opérateur n'existe pas : integer ~~* unknown LINE
1: ...feed"."id") WHERE "feedjack_subscriber"."site_id" ILIKE '1' ...
^ HINT: Aucun opérateur ne correspond au nom donné et aux types
d'arguments. Vous devez ajouter des conversions explicites de type.
SELECT "feedjack_subscriber"."id", "feedjack_subscriber"."site_id",
"feedjack_subscriber"."feed_id", "feedjack_subscriber"."name",
"feedjack_subscriber"."shortname", "feedjack_subscriber"."is_active"
FROM "feedjack_subscriber" INNER JOIN "feedjack_site" ON
("feedjack_subscriber"."site_id" = "feedjack_site"."id") INNER JOIN
"feedjack_feed" ON ("feedjack_subscriber"."feed_id" =
"feedjack_feed"."id") WHERE "feedjack_subscriber"."site_id" ILIKE '1'
AND "feedjack_subscriber"."feed_id" = '1' ORDER BY
"feedjack_site"."name" ASC, "feedjack_subscriber"."name" ASC,
"feedjack_feed"."name" ASC, "feedjack_feed"."feed_url" ASC
Request Method: POST
Request URL: http://forge.tuxservices.org/projets/admin/feedjack/subscriber/add/
Exception Type: ProgrammingError
Exception Value: ERREUR: l'opérateur n'existe pas : integer ~~*
unknown LINE 1: ...feed"."id") WHERE "feedjack_subscriber"."site_id"
ILIKE '1' ... ^ HINT: Aucun opérateur ne correspond au nom donné et
aux types d'arguments. Vous devez ajouter des conversions explicites
de type. SELECT "feedjack_subscriber"."id",
"feedjack_subscriber"."site_id", "feedjack_subscriber"."feed_id",
"feedjack_subscriber"."name", "feedjack_subscriber"."shortname",
"feedjack_subscriber"."is_active" FROM "feedjack_subscriber" INNER
JOIN "feedjack_site" ON ("feedjack_subscriber"."site_id" =
"feedjack_site"."id") INNER JOIN "feedjack_feed" ON
("feedjack_subscriber"."feed_id" = "feedjack_feed"."id") WHERE
"feedjack_subscriber"."site_id" ILIKE '1' AND
"feedjack_subscriber"."feed_id" = '1' ORDER BY "feedjack_site"."name"
ASC, "feedjack_subscriber"."name" ASC, "feedjack_feed"."name" ASC,
"feedjack_feed"."feed_url" ASC
Exception Location: /usr/lib/python2.5/site-packages/django/db/
backends/postgresql/base.py in execute, line 47
Python Executable: /usr/bin/python
Python Version: 2.5.2
Python Path: ['/var/django/forge.tuxservices.org', '/usr/lib/
python2.5/site-packages/Trac-0.12dev_r7087-py2.5.egg', '/usr/lib/
python2.5/site-packages/Babel-1.0dev_r364-py2.5.egg', '/usr/lib/
python2.5/site-packages/pytz-2008b-py2.5.egg', '/usr/lib/python2.5/
site-packages/textile-2.0.11-py2.5.egg', '/usr/lib/python2.5/site-
packages/Genshi-0.4.4-py2.5.egg', '/usr/lib/python2.5/site-packages/
feedparser-4.1-py2.5.egg', '/usr/lib/python2.5/site-packages/
Feedjack-0.9.12-py2.5.egg', '/usr/lib/python25.zip', '/usr/lib/
python2.5', '/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-
tk', '/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-
packages', '/usr/lib/python2.5/site-packages']
Server time: Mer, 21 Mai 2008 19:41:56 +0200

And when I add feed, the hidden field wich have to be updated by
feedjack, stay blank ...
How can I trace this ?

Nicolas JEUDY

njeudy

unread,
May 21, 2008, 1:51:52 PM5/21/08
to Feedjack
Just to add that I use postgresql DB :)

Nicolas JEUDY

Gustavo Picón

unread,
Jun 8, 2008, 2:30:10 AM6/8/08
to Feedjack
On May 21, 12:51 pm, njeudy <nje...@gmail.com> wrote:
> Just to add that I use postgresql DB :)
>
> Nicolas JEUDY

Nicolas, what version of postgres is that? I just tested a fresh
install with postgres 8.3 on freebsd without problems.

- tabo

dsachs

unread,
Jul 1, 2008, 2:41:34 PM7/1/08
to Feedjack
I realize this is an old thread, but I ran into this as well. I am
running pgsql 8.3 on Windows (for development purposes). The
offending line of code is in the Meta section of the Subscriber class
in models.py: unique_together = (('site', 'feed'),)

There has been a reported issue with Django and Postgres 8.3 using
IEXACT comparisons, which causes postgres to try to do an ILIKE on the
site.id (as shown in the error stack above). See the ticket here:
http://code.djangoproject.com/ticket/6523.

I commented out the unique_together and got it working, though that is
obviously not ideal. This looks like a Django problem, not a Feedjack
problem--unless there's a better Feedjack workaround.

Thanks,

David

Gustavo Picón

unread,
Jul 7, 2008, 12:18:43 AM7/7/08
to Feedjack
On Jul 1, 1:41 pm, dsachs <david.sa...@gmail.com> wrote:
> I realize this is an old thread, but I ran into this as well. I am
> running pgsql 8.3 on Windows (for development purposes). The
> offending line of code is in the Meta section of the Subscriber class
> in models.py: unique_together = (('site', 'feed'),)
>
> There has been a reported issue with Django and Postgres 8.3 using
> IEXACT comparisons, which causes postgres to try to do an ILIKE on the
> site.id (as shown in the error stack above). See the ticket here:http://code.djangoproject.com/ticket/6523.
>
> I commented out the unique_together and got it working, though that is
> obviously not ideal. This looks like a Django problem, not a Feedjack
> problem--unless there's a better Feedjack workaround.

Just confirmed this, turns out I was testing postgres 8.2 and this
problem occurs only in 8.3 (had to reinstall postgres in a freebsd
testing server for this).

So the problem seems to be an update in Postgres itself:
http://www.postgresql.org/docs/8.3/static/release-8-3.html#AEN86013
that exposes a weird design decision in django, as explained in
http://code.djangoproject.com/ticket/6523

Now, I could fix this on feedjack itself but it would involve:
(a) dropping the database constraint (no way) or
(b) monkeypatching the db backend (this would mean that the user would
have to add a middleware entry in his feedjack settings file)

Since (a) is not an option and (b) isn't really transparent to the
user, AND considering that this problem exists at the django level and
will re-appear on other apps, I'd suggest patching the postgres
backend, at least until it hits trunk.

The patch: http://code.djangoproject.com/attachment/ticket/6523/iexact.patch
works, I just tested it on postgres 8.3. Another option of course, is
to downgrade to postgres 8.2.

- tabo
Reply all
Reply to author
Forward
0 new messages