Re: Duplicate tables information through metadata queries - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: Duplicate tables information through metadata queries
Date
Msg-id CAKFQuwZEEwiwshFm8Y=igVR3bAffc3N91L79mU_wACG1x8e+mA@mail.gmail.com
Whole thread Raw
In response to Re: Duplicate tables information through metadata queries  (Dave Cramer <davecramer@postgres.rocks>)
Responses RE: Duplicate tables information through metadata queries  ("ldh@laurent-hasson.com" <ldh@laurent-hasson.com>)
List pgsql-jdbc
On Wednesday, September 8, 2021, Dave Cramer <davecramer@postgres.rocks> wrote:

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.

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Duplicate tables information through metadata queries
Next
From: "ldh@laurent-hasson.com"
Date:
Subject: RE: Duplicate tables information through metadata queries