[sqlalchemy] Postgresql COPY

2011-04-15 Thread Yang Zhang
Is it possible to execute a Postegresql COPY ... FROM STDIN statement via sqlalchemy, or do we have to drop down to psycopg2 for that (http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from)? Tried executing a COPY statement followed directly by the input values, as in psql, but

[sqlalchemy] How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread bool
Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? t = Table(abc, MetaData(conn), Column(x, String), Column(y, Integer)) u = t.update().values(x='a') # Now I want to get list of columns being updated (i.e., x)

[sqlalchemy] Re: Context based execution

2011-04-15 Thread bool
Hi, Thanks a lot. Can someone answer this question also = @compiles(Select) def contextual_select_thing(select, compiler, **kw): This method gets registered with Select. But How/When does this registration automatically happen?

[sqlalchemy] Re: using window functions in expressions

2011-04-15 Thread botz
Yeah SQL 2003 standard says no comma between window specification details generally, and postgresql, oracle at least aren't expecting it. (ansi 2003 draft:) 7.11 window clause ... window specification details ::= [ existing window name ] [ window partition clause ] [ window order clause ] [

Re: [sqlalchemy] Postgresql COPY

2011-04-15 Thread Michael Bayer
On Apr 15, 2011, at 3:17 AM, Yang Zhang wrote: Is it possible to execute a Postegresql COPY ... FROM STDIN statement via sqlalchemy, or do we have to drop down to psycopg2 for that (http://initd.org/psycopg/docs/usage.html#using-copy-to-and-copy-from)? Tried executing a COPY statement

Re: [sqlalchemy] Re: using window functions in expressions

2011-04-15 Thread Michael Bayer
yeah got your ticket someone will get to it today hopefully, thanks ! On Apr 15, 2011, at 9:47 AM, botz wrote: Yeah SQL 2003 standard says no comma between window specification details generally, and postgresql, oracle at least aren't expecting it. (ansi 2003 draft:) 7.11 window clause

RE: [sqlalchemy] Re: Context based execution

2011-04-15 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalchemy@googlegroups.com] On Behalf Of bool Sent: 15 April 2011 14:41 To: sqlalchemy Subject: [sqlalchemy] Re: Context based execution Hi, Thanks a lot. Can someone answer this question also

Re: [sqlalchemy] How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread Michael Trier
Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? The attributes.get_history method will return this information to you as a History record for each attribute. See here:

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 11:55 am, Michael Trier mtr...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? The attributes.get_history method will return this information to you as a History record for

[sqlalchemy] Re: How to find columns being updated/inserted given a Update/Insert object

2011-04-15 Thread empty
On Apr 15, 7:03 am, bool manohar.kod...@gmail.com wrote: Given an Update(or Insert) object how can I find the columns being updated (or Inserted). I dont find any function that gives these? t = Table(abc, MetaData(conn), Column(x, String), Column(y, Integer)) u = t.update().values(x='a')

Re: [sqlalchemy] Postgresql COPY

2011-04-15 Thread Manlio Perillo
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 15/04/2011 09:17, Yang Zhang ha scritto: Is it possible to execute a Postegresql COPY ... FROM STDIN statement via sqlalchemy, or do we have to drop down to psycopg2 for that