List Info

Thread: Why is sqlall outputting INTEGER instead of SERIAL?




Why is sqlall outputting INTEGER instead of SERIAL?
user name
2006-05-30 20:25:07
When I use "syncdb" the primary keys of my
tables are of type SERIAL,
but when I do a "sqlall" or "sql" or
"sqlreset", I get INTEGER instead.
Why the discrepancy?
I'm using Postgres.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Why is sqlall outputting INTEGER instead of SERIAL?
user name
2006-05-31 00:48:24
On 5/30/06, david.llopisgmail.com
<david.llopisgmail.com> wrote:
> When I use "syncdb" the primary keys of my
tables are of type SERIAL,
> but when I do a "sqlall" or
"sql" or "sqlreset", I get INTEGER
instead.
> Why the discrepancy?
> I'm using Postgres.

This is a Postgres feature. "serial" isn't
actually a data type --
it's a shortcut for an auto-incrementing INTEGER field.

http://www.postgresql.org/docs/8.1/static
/datatype.html#DATATYPE-SERIAL

Adrian

-- 
Adrian Holovaty
holovaty.com | djangoproject.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )