Closed Bug 300311 Opened 15 years ago Closed 15 years ago

[PostgreSQL] bz_table_list_real returns PostgreSQL system tables in addition to normal Bugzilla tables

Categories

(Bugzilla :: Database, defect, P2)

2.20
defect

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: mkanat, Assigned: mkanat)

References

Details

Attachments

(1 file)

If you call $dbh->bz_table_list_real on PostgreSQL, it will return to you, in
addition to the normal Bugzilla table names, a bunch of tables whose names start
with pg_ and sql_. These are the PostgreSQL "system" tables, that describe the
current state of PostgreSQL and the databases inside it.

Normally, PostgreSQL doesn't use bz_table_list_real anywhere. However, the
bzdbcopy script, which I'd like to get into contrib/, does use it, and depends
on it working properly.
Blocks: 291776
Status: NEW → ASSIGNED
Summary: [PostgreSQL] bz_table_list_real returns PostgreSQL system tables in addition to normal Bugzilla tables. → [PostgreSQL] bz_table_list_real returns PostgreSQL system tables in addition to normal Bugzilla tables
Target Milestone: --- → Bugzilla 2.20
Overall, this is really a pretty simple patch. Basically, we just override
bz_list_tables_real for PostgreSQL. I've tested it on landfill with bzdbcopy,
and it makes bzdbcopy work properly for a pg-to-mysql copy, where it didn't
before.
Attachment #188889 - Flags: review?(wicked)
Comment on attachment 188889 [details] [diff] [review]
Grep bz_table_list_real results for PostgreSQL, to remove system tables

I'm going to ask glob to review this, since (a) it's pretty simple and (b) he
reviewed the dependency.
Attachment #188889 - Flags: review?(wicked) → review?(bugzilla)
Priority: -- → P2
Comment on attachment 188889 [details] [diff] [review]
Grep bz_table_list_real results for PostgreSQL, to remove system tables

r=glob
Attachment #188889 - Flags: review?(bugzilla) → review+
a2.20 is for the bzdbcopy script.
Flags: approval?
Flags: approval2.20?
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
Tip:

Checking in Bugzilla/DB/Pg.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm,v  <--  Pg.pm
new revision: 1.13; previous revision: 1.12
done

2.20:

Checking in Bugzilla/DB/Pg.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/DB/Pg.pm,v  <--  Pg.pm
new revision: 1.12.2.1; previous revision: 1.12
done
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.