On Friday, November 18, 2011 8:58:10 am Federico Di Gregorio wrote:
> > The only way I could get the substitution to work is:
> > cur.execute("""select pg_get_serial_sequence(%s,%s)""",('"test 1"','id'))
> > rs=cur.fetchall()
> > rs
> >
> > [('public."test 1_id_seq"',)]
>
> Given your example query in psql that's correct.
It is only an issue if you actually need to double quote a table name to
preserve case, a space, a key word, etc.
--
Adrian Klaver
adrian(dot)klaver(at)gmail(dot)com