fix issue #838 make sure we don't get columns that are dropped #840
Conversation
@davecramer , the key part is to add a test. |
@vlsi once confirmed that this works, I will add the test apparently if causes many of the current tests to fail anyway :( |
My initial thought was to trick @emesika into adding a test :) |
Codecov Report
@@ Coverage Diff @@
## master #840 +/- ##
============================================
+ Coverage 65.56% 65.59% +0.03%
- Complexity 3545 3551 +6
============================================
Files 166 166
Lines 15250 15254 +4
Branches 2475 2475
============================================
+ Hits 9998 10006 +8
+ Misses 4074 4069 -5
- Partials 1178 1179 +1 |
Hi |
@emesika guess we can't convince you to create a test case for it ? |
/* getFunctionColumns also has to be aware of dropped columns | ||
add this in here to make sure it can deal with them | ||
*/ | ||
rs = dbmd.getFunctionColumns(null, null, "f2", null); |
vlsi
Jun 8, 2017
Member
Does this reproduce the problem?
I thought the function should be somehow relate to the table.
As far as I see, f2
is defined as f2(a int, b varchar) RETURNS int
, so I see no way it is related with TABLE metadatatest
Does this reproduce the problem?
I thought the function should be somehow relate to the table.
As far as I see, f2
is defined as f2(a int, b varchar) RETURNS int
, so I see no way it is related with TABLE metadatatest
You are correct, thanks for the review.
I've committed a test that does actually test the problem
Dave Cramer
…On 8 June 2017 at 14:00, Vladimir Sitnikov ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In pgjdbc/src/test/java/org/postgresql/test/jdbc2/
DatabaseMetaDataTest.java
<#840 (comment)>:
> @@ -492,6 +492,23 @@ public void testDroppedColumns() throws SQLException {
assertEquals(3, rs.getInt("ORDINAL_POSITION"));
assertTrue(!rs.next());
rs.close();
+
+ /* getFunctionColumns also has to be aware of dropped columns
+ add this in here to make sure it can deal with them
+ */
+ rs = dbmd.getFunctionColumns(null, null, "f2", null);
Does this reproduce the problem?
I thought the function should be somehow relate to the table.
As far as I see, f2 is defined as f2(a int, b varchar) RETURNS int, so I
see no way it is related with TABLE metadatatest
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#840 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYz9pVMgBcGJUb7Nb_KKpKE5nwUFq_wks5sCDbXgaJpZM4Nymj2>
.
|
…gjdbc#840) * fix issue pgjdbc#838 make sure we don't get columns that are dropped * added test case
No description provided.