Last Comment Bug 300311 - [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 ...
Status: RESOLVED FIXED
:
Product: Bugzilla
Classification: Server Software
Component: Database (show other bugs)
: 2.20
: All All
: P2 normal (vote)
: Bugzilla 2.20
Assigned To: Max Kanat-Alexander
: default-qa
:
Mentors:
Depends on:
Blocks: 291776
  Show dependency treegraph
 
Reported: 2005-07-10 18:10 PDT by Max Kanat-Alexander
Modified: 2016-02-19 09:45 PST (History)
2 users (show)
justdave: approval+
justdave: approval2.20+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Grep bz_table_list_real results for PostgreSQL, to remove system tables (954 bytes, patch)
2005-07-10 18:17 PDT, Max Kanat-Alexander
glob: review+
Details | Diff | Splinter Review

Description Max Kanat-Alexander 2005-07-10 18:10:56 PDT
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.
Comment 1 Max Kanat-Alexander 2005-07-10 18:17:09 PDT
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.
Comment 2 Max Kanat-Alexander 2005-07-11 14:44:30 PDT
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.
Comment 3 Byron Jones ‹:glob› [PTO until 2016-10-10] 2005-07-12 01:15:54 PDT
Comment on attachment 188889 [details] [diff] [review]
Grep bz_table_list_real results for PostgreSQL, to remove system tables

r=glob
Comment 4 Max Kanat-Alexander 2005-07-12 01:16:51 PDT
a2.20 is for the bzdbcopy script.
Comment 5 Max Kanat-Alexander 2005-07-12 21:06:16 PDT
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

Note You need to log in before you can comment on or make changes to this bug.