Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
304
Merge Requests
304
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
a859eb36
Commit
a859eb36
authored
Aug 02, 2008
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#257009
by bjaspan, mustafu, Freso, Dries et al: fixed simpletest exceptions on PostgreSQL.
parent
7f965d0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
modules/system/system.install
modules/system/system.install
+15
-3
No files found.
modules/system/system.install
View file @
a859eb36
...
...
@@ -304,10 +304,22 @@ function system_requirements($phase) {
*/
function
system_install
()
{
if
(
$GLOBALS
[
'db_type'
]
==
'pgsql'
)
{
// We create some custom types and functions using global names instead of
// prefixing them like we do with table names. If this function is ever
// called again (for example, by the test framework when creating prefixed
// test databases), the global names will already exist. We therefore avoid
// trying to create them again in that case.
// Create unsigned types.
db_query
(
"CREATE DOMAIN int_unsigned integer CHECK (VALUE >= 0)"
);
db_query
(
"CREATE DOMAIN smallint_unsigned smallint CHECK (VALUE >= 0)"
);
db_query
(
"CREATE DOMAIN bigint_unsigned bigint CHECK (VALUE >= 0)"
);
if
(
!
db_result
(
db_query
(
"SELECT COUNT(*) FROM pg_constraint WHERE conname = 'int_unsigned_check'"
)))
{
db_query
(
"CREATE DOMAIN int_unsigned integer CHECK (VALUE >= 0)"
);
}
if
(
!
db_result
(
db_query
(
"SELECT COUNT(*) FROM pg_constraint WHERE conname = 'smallint_unsigned_check'"
)))
{
db_query
(
"CREATE DOMAIN smallint_unsigned smallint CHECK (VALUE >= 0)"
);
}
if
(
!
db_result
(
db_query
(
"SELECT COUNT(*) FROM pg_constraint WHERE conname = 'bigint_unsigned_check'"
)))
{
db_query
(
"CREATE DOMAIN bigint_unsigned bigint CHECK (VALUE >= 0)"
);
}
// Create functions.
db_query
(
'CREATE OR REPLACE FUNCTION "greatest"(numeric, numeric) RETURNS numeric AS
...
...
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