Nicholas Wieland wrote:
> I don't know how to implement this for PG without breaking the type
> system in use. AFAIK a Sequence isn't even a sqlalchemy.types (in fact
> it isn't a type, just a an integer with a "default").
> Am I missing something ? Any suggestion is highly appreciated.

well yeah, SERIAL is not a type in SA.  it looks like one in postgres, but
the docs say:

8.1.4. Serial Types

The data types serial and bigserial are not true types, but merely a
notational convenience for setting up unique identifier columns (similar
to the AUTO_INCREMENT property supported by some other databases).

So i consider it as an additional "flag" on the column.  also, SA
currently doesnt even store this "flag", the "auto-incrementish" behavior
is implicit in the way the table is used.  but I am all for adding such a
flag, possibly as a special form of "Default", if available.   Anyway, i
didnt notice that it comes through information_schema with the type SERIAL
instead of "integer", and i would think the unit test for table reflection
would fail if it did.  does it ?  or is the SERIAL attribute somehwere
else in information_schema ?

- mike


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Sqlalchemy-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlalchemy-users

Reply via email to