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

RESOLVED FIXED in Bugzilla 2.20

Status

()

Bugzilla
Database
P2
normal
RESOLVED FIXED
12 years ago
2 years ago

People

(Reporter: Max Kanat-Alexander, Assigned: Max Kanat-Alexander)

Tracking

2.20
Bugzilla 2.20
Bug Flags:
approval +
approval2.20 +

Details

Attachments

(1 attachment)

(Assignee)

Description

12 years ago
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.
(Assignee)

Updated

12 years ago
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
(Assignee)

Comment 1

12 years ago
Created attachment 188889 [details] [diff] [review]
Grep bz_table_list_real results for PostgreSQL, to remove system tables

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.
(Assignee)

Updated

12 years ago
Attachment #188889 - Flags: review?(wicked)
(Assignee)

Comment 2

12 years ago
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)
(Assignee)

Updated

12 years ago
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+
(Assignee)

Comment 4

12 years ago
a2.20 is for the bzdbcopy script.
Flags: approval?
Flags: approval2.20?
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
(Assignee)

Comment 5

12 years ago
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
Last Resolved: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.