#150 ✓ resolved
Catalin Iacob

Test failures about NOTICE messages on unreleased Postgres 9.3

Reported by Catalin Iacob | March 14th, 2013 @ 09:24 PM

Some tests related to NOTICE messages fail with Posgres 9.3 (compiled from Git a few days ago).

The failures happen because statements like: create temp table chatty (id serial primary key); are expected to return NOTICEs that an implicit index and sequence were created for id and in 9.3 those messages have DEBUG1 level, see http://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=d7c73...

Attached patch against devel branch fixes the tests, I tested it with 7.4, 9.2 and Git 9.3.

Comments and changes to this ticket

  • Daniele Varrazzo

    Daniele Varrazzo March 15th, 2013 @ 11:37 AM

    Thank you, I'll look into the issue.

    Out of curiosity, wouldn't have been the same to add on top of the failing tests something like:

    if postgres_version >= 9.3:
        set client_min_message = debug1
    

    and keep the tests unchanged?

  • Catalin Iacob

    Catalin Iacob March 15th, 2013 @ 04:42 PM

    They couldn't stay completely unchanged. With debug1 I get an extra message (building index...) so at least the test that counts the notices would need changes:

    psycopg2_test=# set client_min_messages = debug1;
    SET
    psycopg2_test=# create temp table abc2 (id serial primary key);
    DEBUG:  CREATE TABLE will create implicit sequence "abc2_id_seq" for serial column "abc2.id"
    DEBUG:  CREATE TABLE / PRIMARY KEY will create implicit index "abc2_pkey" for table "abc2"
    DEBUG:  building index "abc2_pkey" on table "abc2"
    CREATE TABLE
    
  • Daniele Varrazzo

    Daniele Varrazzo March 15th, 2013 @ 04:48 PM

    • State changed from “new” to “open”

    I see, thank you for the tests. I'll commit your test suite patch for the next release.

  • Catalin Iacob

    Catalin Iacob March 15th, 2013 @ 05:06 PM

    Actually, I checked instead of just reasoning about it and I was wrong, the alternative also works.

    The notices get counted only for tables that don't have primary keys so there is no "building index..." message that gets in the way.

    So the attached alternative patch also passes all tests.

  • Catalin Iacob

    Catalin Iacob March 15th, 2013 @ 05:13 PM

    Correct patch now. I attached the wrong file in previous message (and deleted it now to avoid confusion).

  • Daniele Varrazzo
  • Daniele Varrazzo

    Daniele Varrazzo March 16th, 2013 @ 12:56 AM

    • State changed from “open” to “resolved”

    Pushed to devel, thank you.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Psycopg is the most used PostgreSQL adapter for the Python programming language. At the core it fully implements the Python DB API 2.0 specifications. Several extensions allow access to many of the features offered by PostgreSQL.

Shared Ticket Bins

Pages