pg_dump produces invalid SQL
Bug #177382 reported by
KM
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'
To post a comment you must log in.
Confirmed on 8.3RC1.