Re: [sqlalchemy] Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-09 Thread Mike Bayer
On 02/09/2016 12:30 AM, Rudolf Cardinal wrote: Dear all, I've been trying to implement a datetime-style field in SQL Alchemy that, in the database backend, uses a specific ISO-8601 format (e.g. "2013-04-30T00:26:03.000+05:00"), and is a datetime at the Python end. The primary database engine

[sqlalchemy] Thoughts on Column(unique=True, index=True) creating a unique constraint for postgres?

2016-02-09 Thread Jonathan Beluch
Not sure about other DBs, but according to pg docs [1], it's preferred to make a unique constraint (and know that you get the index for free) versus creating a unique index. Knowing this for pg, you can just do unique=True and get the constraint and the index. I realize this is a very small

Re: [sqlalchemy] Thoughts on Column(unique=True, index=True) creating a unique constraint for postgres?

2016-02-09 Thread Mike Bayer
On 02/09/2016 04:47 PM, Jonathan Beluch wrote: Not sure about other DBs, but according to pg docs [1], it's preferred to make a unique constraint (and know that you get the index for free) versus creating a unique index. I'm not seeing the word "preferred" in that document?It is actually

[sqlalchemy] Re: Is it possible to use a Comparator to override a database/SQL-side comparison symmetrically?

2016-02-09 Thread Rudolf Cardinal
Dear Mike, Thank you very much! That makes sense; good to know. all the best, Rudolf. -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [sqlalchemy] Thoughts on Column(unique=True, index=True) creating a unique constraint for postgres?

2016-02-09 Thread Jonathan Vanasco
On Tuesday, February 9, 2016 at 6:20:30 PM UTC-5, Michael Bayer wrote: > > I'm not seeing the word "preferred" in that document?It is actually > simpler from a database introspection perspective to create a UNIQUE > INDEX alone, the UNIQUE CONSTRAINT is redundant on the Postgresql >