This project is archived and is in readonly mode.
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
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
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.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<b>WARNING:</b> the informations in this tracker are archived. Please submit new tickets or comments to <a href="https://github.com/psycopg/psycopg2/issues">the new tracker</a>.
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.