Firebird backend

3 views
Skip to first unread message

Lele Gaifax

unread,
Mar 19, 2007, 11:03:04 AM3/19/07
to sqlalchemy
Hi all,

I attached a snapshot of my current source of the Firebird backend for
SA to ticket #410. This version passes several more unittests, in
particular wrt the supported types: BLOBs and Unicode should work now.

Since I'd be very sad knowing I'm breaking someone else project, I'd
like to hear a voice from some other FB user, before asking Michael to
accept this work.

There are mainly two areas that still need some work:
a) better handling of dialect 1 (a.k.a. Interbase 5.x) datatypes
b) correct the way the backend deals with "case-sensitive"

a) requires some way to reach the actual connection from the
dialect.type_descriptor(), that needs to know which dialect the
connection is talking to give the right answer.

b) is now alleviated, in dialect.has_table(), by using the LIKE operator
instead of a straight "=" on the table name; more, the
dialect.reflecttable() now initialize the "case_sensitive" flag on each
column, but this clearly needs more work, mainly to better understand
the whole logic behind "case_sensitive" on my part.

Please see:
http://www.sqlalchemy.org/trac/attachment/ticket/410/firebird.py

Thanks in advance for any feedback,
ciao, lele.

Oleg Deribas

unread,
Mar 20, 2007, 4:21:27 AM3/20/07
to sqlal...@googlegroups.com
Hello,

Lele Gaifax said the following on 19.03.2007 17:03:

> Since I'd be very sad knowing I'm breaking someone else project, I'd
> like to hear a voice from some other FB user, before asking Michael to
> accept this work.

Here is simple code which works with the stock backend and fails with
the new:

http://paste.turbogears.org/paste/1138

--
Oleg

Lele Gaifax

unread,
Mar 31, 2007, 7:36:08 PM3/31/07
to sqlal...@googlegroups.com

Sorry for the late answer, but see http://rafb.net/p/dv4lIn88.html and
http://rafb.net/p/MkgNud70.html

I checked and the "role" argument is correctly seen by the FB backend,
and your script works for me *when* accessing the database as LELE, but
effectively not when using SYSDBA, *if* with "fails" you mean that you
get "NONE" as result.

And... I'm ashtonished to ear that it does work for you, with the
pristine backend. It may very well be me misunderstanding the roles, as
I never used them. Do they work when connecting as SYSDBA?

Thank you,
bye, lele.

Oleg Deribas

unread,
Apr 1, 2007, 3:57:12 AM4/1/07
to sqlal...@googlegroups.com
Hello,

Lele Gaifax said the following on 01.04.2007 2:36:

> I checked and the "role" argument is correctly seen by the FB backend,
> and your script works for me *when* accessing the database as LELE, but
> effectively not when using SYSDBA, *if* with "fails" you mean that you
> get "NONE" as result.

No, I mean - I've got exception when executing that code with the new
backend:

http://paste.turbogears.org/paste/1177

> And... I'm ashtonished to ear that it does work for you, with the
> pristine backend. It may very well be me misunderstanding the roles, as
> I never used them. Do they work when connecting as SYSDBA?

Yes they work, but it is not crucial here. I just use this as example
because "SELECT CURRENT_ROLE FROM RDB$DATABASE" is the first SQL
statement in my program and it doesn't work with the new backend ;-)

--
Oleg

Lele Gaifax

unread,
Apr 1, 2007, 11:40:01 AM4/1/07
to sqlal...@googlegroups.com
Oleg Deribas wrote:
> No, I mean - I've got exception when executing that code with the new
> backend:
>
> http://paste.turbogears.org/paste/1177

Uhm, this is really strange: the backend is involvend only marginally in
your example as the traceback shows, I thought it was a problem of
applying all the arguments coming down from the URL to the actual
connection...

I see that you are on Windows, using Python 2.5, and SA 0.3.6. I cannot
retry the exact combination, but will try with the latest two on
GNU/Linux. Any chance for you to try out the current trunk of SA? That's
what I

>> Do they work when connecting as SYSDBA?
>
> Yes they work, but it is not crucial here.

Ok, I see: even SYSDBA needs an explicit grant to use the ROLE...

ciao, lele.

Reply all
Reply to author
Forward
0 new messages