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.

Test failures about NOTICE messages on unreleased Postgres 9.3

#150

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.

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

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. Daniele Varrazzo
    Daniele Varrazzo

    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?

    March 15th, 2013 @ 11:37 AM

  2. Catalin Iacob
    Catalin Iacob

    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
    

    March 15th, 2013 @ 04:42 PM

  3. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to open

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

    March 15th, 2013 @ 04:48 PM

  4. Catalin Iacob
    Catalin Iacob

    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.

    March 15th, 2013 @ 05:06 PM

  5. Catalin Iacob
    Catalin Iacob

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

    March 15th, 2013 @ 05:13 PM

  6. Daniele Varrazzo
  7. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from open to resolved

    Pushed to devel, thank you.

    March 16th, 2013 @ 12:56 AM