Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
647b7158
Commit
647b7158
authored
Apr 10, 2015
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 1152862: Require PostgreSQL 9.0
r/a=glob
parent
8a1de002
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
27 deletions
+3
-27
Constants.pm
Bugzilla/Constants.pm
+3
-6
Pg.pm
Bugzilla/DB/Pg.pm
+0
-21
No files found.
Bugzilla/Constants.pm
View file @
647b7158
...
@@ -527,15 +527,12 @@ use constant DB_MODULE => {
...
@@ -527,15 +527,12 @@ use constant DB_MODULE => {
version
=>
'4.001'
,
version
=>
'4.001'
,
},
},
name
=>
'MySQL'
},
name
=>
'MySQL'
},
# Also see Bugzilla::DB::Pg::bz_check_server_version, which has special
'pg'
=>
{
db
=>
'Bugzilla::DB::Pg'
,
db_version
=>
'9.00.0000'
,
# code to require DBD::Pg 2.17.2 for PostgreSQL 9 and above.
'pg'
=>
{
db
=>
'Bugzilla::DB::Pg'
,
db_version
=>
'8.03.0000'
,
dbd
=>
{
dbd
=>
{
package
=>
'DBD-Pg'
,
package
=>
'DBD-Pg'
,
module
=>
'DBD::Pg'
,
module
=>
'DBD::Pg'
,
# 2.7.0 fixes a problem with quoting strings
# Pg 9.2 requires 2.19.3 as spclocation no longer exists.
# containing backslashes in them.
version
=>
'2.19.3'
,
version
=>
'2.7.0'
,
},
},
name
=>
'PostgreSQL'
},
name
=>
'PostgreSQL'
},
'oracle'
=>
{
db
=>
'Bugzilla::DB::Oracle'
,
db_version
=>
'10.02.0'
,
'oracle'
=>
{
db
=>
'Bugzilla::DB::Oracle'
,
db_version
=>
'10.02.0'
,
...
...
Bugzilla/DB/Pg.pm
View file @
647b7158
...
@@ -102,11 +102,6 @@ sub sql_group_concat {
...
@@ -102,11 +102,6 @@ sub sql_group_concat {
$order_by
=
" ORDER BY $1"
;
$order_by
=
" ORDER BY $1"
;
}
}
if
(
vers_cmp
(
$self
->
bz_server_version
,
9
)
<
0
)
{
# PostgreSQL 8.x doesn't support STRING_AGG
return
"ARRAY_TO_STRING(ARRAY_AGG($text$order_by), $separator)"
;
}
return
"STRING_AGG(${text}::text, $separator${order_by}::text)"
return
"STRING_AGG(${text}::text, $separator${order_by}::text)"
}
}
...
@@ -212,20 +207,6 @@ sub bz_explain {
...
@@ -212,20 +207,6 @@ sub bz_explain {
# Custom Database Setup
# Custom Database Setup
#####################################################################
#####################################################################
sub
bz_check_server_version
{
my
$self
=
shift
;
my
(
$db
)
=
@_
;
my
$server_version
=
$self
->
SUPER::
bz_check_server_version
(
@_
);
my
(
$major_version
,
$minor_version
)
=
$server_version
=~
/^0*(\d+)\.0*(\d+)/
;
# Pg 9.0 requires DBD::Pg 2.17.2 in order to properly read bytea values.
# Pg 9.2 requires DBD::Pg 2.19.3 as spclocation no longer exists.
if
(
$major_version
>=
9
)
{
local
$db
->
{
dbd
}
->
{
version
}
=
(
$minor_version
>=
2
)
?
'2.19.3'
:
'2.17.2'
;
local
$db
->
{
name
}
=
$db
->
{
name
}
.
" ${major_version}.$minor_version"
;
Bugzilla::DB::
_bz_check_dbd
(
@_
);
}
}
sub
bz_setup_database
{
sub
bz_setup_database
{
my
$self
=
shift
;
my
$self
=
shift
;
$self
->
SUPER::
bz_setup_database
(
@_
);
$self
->
SUPER::
bz_setup_database
(
@_
);
...
@@ -436,8 +417,6 @@ sub bz_table_list_real {
...
@@ -436,8 +417,6 @@ sub bz_table_list_real {
=
item
sql_to_days
=
item
sql_to_days
=
item
bz_check_server_version
=
item
sql_from_days
=
item
sql_from_days
=
item
bz_table_list_real
=
item
bz_table_list_real
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment