that is registered as enum type
select * from pg_type where typname = 'visibility';
select * from pg_enum where enumlabel in ('public', 'private', 'custom');
it works pretty fine
On Friday, January 24, 2014 11:24:02 AM UTC+1, Pedro Romano wrote:
Executing the following test code
Thank you Michael! That did the trick.
--Pedro.
On Friday, 24 January 2014 17:56:25 UTC, Michael Bayer wrote:
On Jan 24, 2014, at 5:24 AM, Pedro Romano pmc...@gmail.com javascript:
wrote:
Which means the PostgreSQL enumerate type isn't being created as it would
have been
According to the
documentationhttp://docs.sqlalchemy.org/en/rel_0_8/core/constraints.html?highlight=desc#functional-indexes,
the following index definition:
Index('ix_table_column_desc', table.c.column.desc())
should render in PostgreSQL to:
CREATE INDEX ix_table_column_desc
ON table
sqlalchemy.engine.base.Engine {}
On Oct 7, 2013, at 1:37 PM, Pedro Romano pmc...@gmail.com javascript:
wrote:
According to the
documentationhttp://docs.sqlalchemy.org/en/rel_0_8/core/constraints.html?highlight=desc#functional-indexes,
the following index definition:
Index
as that class has been mapped ahead of that call.
On Oct 7, 2013, at 5:09 PM, Pedro Romano pmc...@gmail.com javascript:
wrote:
Thanks for quick and comprehensive reply Michael.
I apologise for having been lazy and not providing an example that
illustrated the issue. The examples of rendered SQL
Having to support different PostgreSQL schemas per web request and finding
my current approach of setting the PostgreSQL schema search path a bit
convoluted, when I try to use longer lived sessions in unit tests
for convenience, because the session starts using a new database connection
after
, is to set it in the
after_begin Session event:
from sqlalchemy import event
@event.listens_for(Session, after_begin)
def after_begin(session, trans, conn):
conn.execute(set search path to my_schema, public)
On Apr 7, 2013, at 6:09 AM, Pedro Romano pmc...@gmail.com javascript:
wrote
A big thank you to Mike and all the other contributors, for what is a
shining example of usefulness, quality and excellence!
--
You received this message because you are subscribed to the Google Groups
sqlalchemy group.
To view this discussion on the web visit
I have tried using 'SAVEPOINT' transactions (via 'session.begin_nested')
with a 'SQLite' database connection, but got an exception when a
'session.add()', triggered an integrity error, nstead of the expected
'ROLLBACK TO SAVEPOINT':
The logged statements are:
BEGIN (implicit)
SAVEPOINT
Thank you very much for your reply Michael. It confirms my suspicions.
--Pedro.
On Friday, October 26, 2012 4:17:23 PM UTC+1, Michael Bayer wrote:
the short answer is that this is a Pysqlite bug. A short test makes this
clear - and here is the bug report for them with a patch:
Thanks for your thorough reply Michael. The current implementation is
perfectly adequate and should definitely not be made more complex to handle
corner cases (the class / instance listeners precedence issue had also come
to mind). Well designed code won't need to depend on the libraries it
Hi! Tried searching around for information on this topic but couldn't
find anything, so here's the question: is it possible to use passive
deletes with joined table inheritance? Setting the
'ondelete=CASCADE' on the foreign key declaration of the child class
primary key is trivial, however there
Thank you very much for the quick reply and the advice Michael.
--Pedro.
On Dec 15, 3:27 pm, Michael Bayer mike...@zzzcomputing.com wrote:
On Dec 15, 2011, at 4:06 AM, Pedro Romano wrote:
Hi! Tried searching around for information on this topic but couldn't
find anything, so here's
Hi,
Is there any way to set a column default to be a different server
function depending on the dialect? For python function defaults, this
is trivial using a context-sensitive default function and getting the
dialect from the context, however these don't cover server functions
for defaults,
Hi,
Is there any way to set a column default to be a different server
function depending on the dialect? For python function defaults, this
is trivial using a context-sensitive default function and getting the
dialect from the context, however these don't cover server functions
for defaults,
PLEASE IGNORE... BAD SUBJECT!
New post with correct subject. Sorry for the noise.
--Pedro.
On Apr 21, 12:12 pm, Pedro Romano pmcn...@gmail.com wrote:
Hi,
Is there any way to set a column default to be a different server
function depending on the dialect? For python function defaults
for Postgresql's TIMESTAMP type which features this
option natively. SQLite's type could support this flag as well so I've
added ticket #1985.
For now you'd have to subclass sqlite.DATETIME and provide an alternate
bind/result processor.
On Nov 25, 2010, at 9:03 AM, Pedro Romano wrote
Needing timezone aware 'DateTime' columns in my 'SQLite' database, I
noticed that the aware 'datetime's I was storing in the SQLite
database in the 'DateTime(timezone=True)' columns were being stored as
naive timestamps without timezone information.
I also checked that in the source code
18 matches
Mail list logo