| From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
|---|---|
| To: | Dave Cramer <davecramer(at)postgres(dot)rocks> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, "ldh(at)laurent-hasson(dot)com" <ldh(at)laurent-hasson(dot)com>, "pgsql-jdbc(at)lists(dot)postgresql(dot)org" <pgsql-jdbc(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Duplicate tables information through metadata queries |
| Date: | 2021-09-09 00:53:52 |
| Message-ID: | CAKFQuwZEEwiwshFm8Y=igVR3bAffc3N91L79mU_wACG1x8e+mA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
On Wednesday, September 8, 2021, Dave Cramer <davecramer(at)postgres(dot)rocks>
wrote:
> fix duplicate table names by davecramer · Pull Request #2245 ·
> pgjdbc/pgjdbc (github.com) <https://github.com/pgjdbc/pgjdbc/pull/2245>
>
> I'd like to add a test case that would break otherwise,
>
Seems like munging OIDs on system tables would be outside what the test
environment would be reasonably capable of doing, though I’m not familiar
with whether you can mock the server and stub out a resultset response to
the query that would contain multiple records. The error mode is not
returning exactly one record. Testing for that at runtime is simple, but
what is a good response if that unlikely event happens?
I don’t know if it is even possible for a stock install to have two OIDs
globally duplicated - though it isn’t hard to check for on a given server.
Creating thousands of tables, or types, or whatnot on said server until a
global duplicate appears would be fairly straight-forward, if potentially
time and, to a lesser extent (drop table et al.) space consuming. Probably
worth doing for adhoc testing but less so in a unit test suite.
David J.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | ldh@laurent-hasson.com | 2021-09-09 02:56:35 | RE: Duplicate tables information through metadata queries |
| Previous Message | Dave Cramer | 2021-09-09 00:34:11 | Re: Duplicate tables information through metadata queries |