Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Support for bind parameters in copy_expert()

#39

I'm working on something that uses copy_to/copy_expert to fetch query results into a file, but I'd like to be able to pass bind parameters so that I can feel comfortable about avoiding SQL injection problems in generating the query.

Reported by Giles Brown · February 3rd, 2011 @ 04:56 PM

State: invalid
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo
    • Tag set to copy, feature

    You can use mogrify to generate the query safely.

    http://initd.org/psycopg/docs/cursor.html#cursor.mogrify

    I'd rather avoid complicating further the copy area. The copy methods already have a quite complex interface.

    February 3rd, 2011 @ 09:10 PM

  2. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to invalid

    Closing the ticket for the above motivation. If you feel something better should be done please discuss on the mailing list. Thank you very much.

    February 15th, 2011 @ 11:29 PM