On Aug 20, 2014, at 7:16 PM, Dave Vitek <[email protected]> wrote:

> Hi all,
> 
> I recently upgraded from 0.7.10 to 0.9.7.  I'm seeing what looks like a 
> regression:
> 
> (Pdb) p str(select([null(), null()]))
> 'SELECT NULL AS anon_1'
> 
> After the upgrade, sqlalchemy seems to coalesce multiple adjacent nulls into 
> a single one.  I can work around the problem by doing this instead:
> 
> (Pdb) p str(select([literal_column('NULL'), literal_column('NULL')]))
> 'SELECT NULL, NULL'
> 
> Is there a better way of doing this?  Is this a bug?
> 
> I'm doing this to feed an INSERT statement as in insert().from_select(...).


select()'s generally like for expressions to be named, so at the very least, 
give these a label, e.g. select([null().label('n1'), null().label('n2')]).

as far as why it's doing that, sure its probably a bug

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to