If I run the following query on psql:

SELECT nextval('redirect_link_id_seq');

it returns an integer, say 5

when I do the following with the django shell I get a different
result:

>>> def get_next_id():
...     cursor = connection.cursor()
...     cursor.execute("SELECT nextval('redirect_link_id_seq');")
...     next_id = cursor.fetchone()
...     return next_id
>>> row = get_next_id()
>>> row[0]
5L

Of course I can cast to an integer
>>> int(row[0])
5

But I was hoping someone could let me know why my return value is 5L
and not 5, sorry for such a noob question.
I
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to