Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
52069570
Commit
52069570
authored
Jun 05, 2002
by
Dave Cramer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed getImported/ExportedKeys to be simpler, and return the correct number of keys
parent
40690c12
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
271 additions
and
117 deletions
+271
-117
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
...nterfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
+266
-114
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
.../jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
+5
-3
No files found.
src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java
View file @
52069570
This diff is collapsed.
Click to expand it.
src/interfaces/jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
View file @
52069570
...
@@ -9,7 +9,7 @@ import java.sql.*;
...
@@ -9,7 +9,7 @@ import java.sql.*;
*
*
* PS: Do you know how difficult it is to type on a train? ;-)
* PS: Do you know how difficult it is to type on a train? ;-)
*
*
* $Id: DatabaseMetaDataTest.java,v 1.
7 2002/05/30 16:39:26
davec Exp $
* $Id: DatabaseMetaDataTest.java,v 1.
8 2002/06/05 19:12:01
davec Exp $
*/
*/
public
class
DatabaseMetaDataTest
extends
TestCase
public
class
DatabaseMetaDataTest
extends
TestCase
...
@@ -235,6 +235,7 @@ public class DatabaseMetaDataTest extends TestCase
...
@@ -235,6 +235,7 @@ public class DatabaseMetaDataTest extends TestCase
Connection
con1
=
JDBC2Tests
.
openDB
();
Connection
con1
=
JDBC2Tests
.
openDB
();
JDBC2Tests
.
createTable
(
con1
,
"people"
,
"id int4 primary key, name text"
);
JDBC2Tests
.
createTable
(
con1
,
"people"
,
"id int4 primary key, name text"
);
JDBC2Tests
.
createTable
(
con1
,
"policy"
,
"id int4 primary key, name text"
);
JDBC2Tests
.
createTable
(
con1
,
"policy"
,
"id int4 primary key, name text"
);
JDBC2Tests
.
createTable
(
con1
,
"users"
,
"id int4 primary key, people_id int4, policy_id int4,"
+
JDBC2Tests
.
createTable
(
con1
,
"users"
,
"id int4 primary key, people_id int4, policy_id int4,"
+
"CONSTRAINT people FOREIGN KEY (people_id) references people(id),"
+
"CONSTRAINT people FOREIGN KEY (people_id) references people(id),"
+
"constraint policy FOREIGN KEY (policy_id) references policy(id)"
);
"constraint policy FOREIGN KEY (policy_id) references policy(id)"
);
...
@@ -261,9 +262,10 @@ public class DatabaseMetaDataTest extends TestCase
...
@@ -261,9 +262,10 @@ public class DatabaseMetaDataTest extends TestCase
assertTrue
(
fkColumnName
.
equals
(
"people_id"
)
||
fkColumnName
.
equals
(
"policy_id"
)
)
;
assertTrue
(
fkColumnName
.
equals
(
"people_id"
)
||
fkColumnName
.
equals
(
"policy_id"
)
)
;
String
fkName
=
rs
.
getString
(
"FK_NAME"
);
String
fkName
=
rs
.
getString
(
"FK_NAME"
);
assertTrue
(
fkName
.
equals
(
"people
"
)
||
fkName
.
equals
(
"polic
y"
)
);
assertTrue
(
fkName
.
equals
(
"people
_pkey"
)
||
fkName
.
equals
(
"policy_pke
y"
)
);
String
pkName
=
rs
.
getString
(
"PK_NAME"
);
String
pkName
=
rs
.
getString
(
"PK_NAME"
);
// assertTrue( pkName.equals("users") );
}
}
...
@@ -280,7 +282,7 @@ public class DatabaseMetaDataTest extends TestCase
...
@@ -280,7 +282,7 @@ public class DatabaseMetaDataTest extends TestCase
assertTrue
(
rs
.
getString
(
"FKTABLE_NAME"
).
equals
(
"users"
)
);
assertTrue
(
rs
.
getString
(
"FKTABLE_NAME"
).
equals
(
"users"
)
);
assertTrue
(
rs
.
getString
(
"FKCOLUMN_NAME"
).
equals
(
"people_id"
)
);
assertTrue
(
rs
.
getString
(
"FKCOLUMN_NAME"
).
equals
(
"people_id"
)
);
assertTrue
(
rs
.
getString
(
"FK_NAME"
).
equals
(
"people"
)
);
assertTrue
(
rs
.
getString
(
"FK_NAME"
).
equals
(
"people
_pkey
"
)
);
JDBC2Tests
.
dropTable
(
con1
,
"users"
);
JDBC2Tests
.
dropTable
(
con1
,
"users"
);
...
...
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