pg_dump produces invalid SQL

Bug #177382 reported by KM
2
Affects Status Importance Assigned to Milestone
postgresql-8.3 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: postgresql-8.2

1. Create an empty database.

2. Connect to the database and create these views:

create view foo as select 3;
create view bar as select count(*) from foo group by cast(null as numeric);

3. pg_dump the database to a text file. The file contains

   'CREATE VIEW bar AS
       SELECT count(*) AS count FROM foo GROUP BY 2;'

4. Drop view bar from the database.

5. Run the CREATE VIEW bar..; statement from the text file.

6. The statement fails with

   'ERROR: GROUP BY position 2 is not in select list'

Revision history for this message
Martin Pitt (pitti) wrote :

Confirmed on 8.3RC1.

Changed in postgresql-8.2:
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Forwarded to <email address hidden>, you are in CC: in case upstream has more specific questions. Thank you!

Revision history for this message
Martin Pitt (pitti) wrote :

This was fixed in 8.3.0 final, thus it is fixed in Hardy.

Changed in postgresql-8.2:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.