Project

General

Profile

« Previous | Next » 

Revision 13003

lib/sql.py: run_query_into() added add_pkey_warn param to support turning off "could not create unique index" warnings, which are sometimes benign (eg. when using set-returning functions with column-based import)

View differences:

sql.py
711 711
    table = sql_gen.as_Table(table)
712 712
    run_query(db, 'LOCK TABLE '+table.to_str(db)+' IN '+mode+' MODE')
713 713

  
714
def run_query_into(db, query, into=None, add_pkey_=False, **kw_args):
714
def run_query_into(db, query, into=None, add_pkey_=False, add_pkey_warn=True,
715
    **kw_args):
715 716
    '''Outputs a query to a temp table.
716 717
    For params, see run_query().
717 718
    '''
......
742 743
            into.name = next_version(into.name)
743 744
            # try again with next version of name
744 745
    
745
    if add_pkey_: add_pkey_or_index(db, into, warn=True)
746
    if add_pkey_: add_pkey_or_index(db, into, warn=add_pkey_warn)
746 747
    
747 748
    # According to the PostgreSQL doc, "The autovacuum daemon cannot access and
748 749
    # therefore cannot vacuum or analyze temporary tables. [...] if a temporary

Also available in: Unified diff