[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-25 Thread David Gardner
So I have applied the patch on my development box, but my production server is still running 0.5.6 un-patched. Can you think of any reason that defining the column as PGText won't work as a temporary workaround? > oh its fine I can do it. we have a testing style that is like this: > > def go()

[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-25 Thread Michael Bayer
David Gardner wrote: > > Thanks for taking time on this one. That definitely fixes the problem. I > entered it in as Ticket #1556. > I am willing to write a test for this defect, but have no idea how to > check for this other than to turn > on engine.echo and spot it on the console. oh its fine I

[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-25 Thread David Gardner
Thanks for taking time on this one. That definitely fixes the problem. I entered it in as Ticket #1556. I am willing to write a test for this defect, but have no idea how to check for this other than to turn on engine.echo and spot it on the console. > I have a theory what this is. Can you try

[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-25 Thread Michael Bayer
David Gardner wrote: > I re-worked my test a little bit to use logging, and to switch table > definitions based on a command line argument. > I was able to trim down my schema to just the two tables in question, > although the behavior is the same regardless > of the related table, and attached is

[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-25 Thread David Gardner
I re-worked my test a little bit to use logging, and to switch table definitions based on a command line argument. I was able to trim down my schema to just the two tables in question, although the behavior is the same regardless of the related table, and attached is that schema along with some d

[sqlalchemy] Re: Text vs. PGText possible bug

2009-09-24 Thread Michael Bayer
On Sep 24, 2009, at 8:21 PM, David Gardner wrote: > Ran across something that I suspect might be a bug. If I define my > table like: > > asset_table = Table('asset', metadata, > Column('path', Text, primary_key=True, > server_default=FetchedValue(), >

[sqlalchemy] Re: text binding for sql queries

2009-02-14 Thread Max Ischenko
On 13 фев, 18:46, a...@svilendobrev.com wrote: > i guess s.execute(stmt, params=dict(codeword=codeword) ) It worked, thanks a lot! Strangely though params= not mentioned on this page: http://www.sqlalchemy.org/docs/05/sqlexpression.html Max. --~--~-~--~~~---~--~--

[sqlalchemy] Re: text binding for sql queries

2009-02-13 Thread az
i guess s.execute(stmt, params=dict(codeword=codeword) ) }On Friday 13 February 2009 18:42:26 Max Ischenko wrote: > I get an error when I'm trying tu run this: > > stmt = text("""select * from salary_data_new > where codeword=:codeword union > select

[sqlalchemy] Re: text() TextClauses and like literals

2008-09-17 Thread Mark Mitchell
Thanks! That is good to know. Having trouble finding the docs for psycopg2 -- any idea off the top of your head what the escape syntax is for %? (When I put in '%%', pyscopg2 outputted %%, not %, to postgres (but didn't throw the exception)). I found the home page for pyscopg2 but no docs. htt

[sqlalchemy] Re: text() TextClauses and like literals

2008-09-17 Thread Michael Bayer
On Sep 17, 2008, at 9:19 AM, Mark Mitchell wrote: > The code to replicate this exception is pretty simple: > >count = con.scalar(select(['count(*)'], from_obj=my_table, > whereclause=text('mytable.column > like \'%\'')) > > That is my error, here is m

[sqlalchemy] Re: text() clause not selected

2008-07-08 Thread Michael Bayer
On Jul 8, 2008, at 9:18 AM, Julien Cigar wrote: > > Hello, > > Any idea why with the following code http://pastebin.com/f6d20e657 > when > I do the q_specimen.join(q_measurements).select() at then end all the > fields from specimen_fields are selected _except_ the > text(specimen_url) > colu

[sqlalchemy] Re: text

2008-06-11 Thread jack2318
Yep. You are right %% instead of \% thanks -- jacek On Jun 11, 9:59 am, Andreas Jung <[EMAIL PROTECTED]> wrote: > --On 11. Juni 2008 17:55:44 +0100 King Simon-NFHD78 > > > > <[EMAIL PROTECTED]> wrote: > > >> -Original Message- > >> From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTE

[sqlalchemy] Re: text

2008-06-11 Thread Andreas Jung
--On 11. Juni 2008 17:55:44 +0100 King Simon-NFHD78 <[EMAIL PROTECTED]> wrote: -Original Message- From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jack2318 Sent: 11 June 2008 17:50 To: sqlalchemy Subject: [sqlalchemy] text I tried very simple test: s =

[sqlalchemy] Re: text

2008-06-11 Thread King Simon-NFHD78
> -Original Message- > From: sqlalchemy@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jack2318 > Sent: 11 June 2008 17:50 > To: sqlalchemy > Subject: [sqlalchemy] text > > > I tried very simple test: > > s = text("SELECT COUNT(*) FROM table WHERE field LIKE 'something'") > cou

[sqlalchemy] Re: TEXT Column type

2007-08-30 Thread voltron
Thanks! On Aug 30, 10:13 pm, jason kirtland <[EMAIL PROTECTED]> wrote: > voltron wrote: > > > Hi all > > > What do I have to import to be able to use the column type TEXT? > > from sqlalchemy import Column, TEXT > Column('mytext', TEXT) > > or use 'String' without a length qualifier: > > fr

[sqlalchemy] Re: TEXT Column type

2007-08-30 Thread jason kirtland
voltron wrote: > > Hi all > > What do I have to import to be able to use the column type TEXT? from sqlalchemy import Column, TEXT Column('mytext', TEXT) or use 'String' without a length qualifier: from sqlalchemy import Column, String Column('mytext', String) --~--~-~--~~

[sqlalchemy] Re: TEXT Column type

2007-08-30 Thread voltron
is this correct? import sqlalchemy.types as types On Aug 30, 10:07 pm, voltron <[EMAIL PROTECTED]> wrote: > Hi all > > What do I have to import to be able to use the column type TEXT? --~--~-~--~~~---~--~~ You received this message because you are subscribed to