pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
6+ messages / 3 participants
[nested] [flat]

* [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2017-02-18 17:40 "vlsi (@vlsi)" <[email protected]>
  0 siblings, 0 replies; 6+ messages in thread

From: vlsi (@vlsi) @ 2017-02-18 17:40 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Currently pgjdbc does not put SQL text to the error messages.
That makes debugging harder.

It would be nice if pgjdbc could just add SQL text.

Note: SQL text and bind variables might impose a security risk (e.g. SQL exceptions might be displayed to the end-user by mistake), so the feature should probably be disabled by default.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2024-12-25 11:21 ` "Shanayshah44 (@Shanayshah44)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: Shanayshah44 (@Shanayshah44) @ 2024-12-25 11:21 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

We can solve this by maintaining a map of properties, where we include a boolean property specifically for controlling whether the SQL text and bind variables should be included in error messages. By default, this property would be set to false, and we could manage it based on the setting or configuration, allowing it to be enabled or disabled as needed. This approach provides flexibility while keeping the feature disabled by default for security reasons.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2024-12-28 04:26 ` "Shanayshah44 (@Shanayshah44)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: Shanayshah44 (@Shanayshah44) @ 2024-12-28 04:26 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Let me know if the approach is right or wrong?


^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2024-12-28 11:31 ` "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2024-12-28 11:31 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Yes, to property, We don't use a map of them though. 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2024-12-28 11:37 ` "vlsi (@vlsi)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: vlsi (@vlsi) @ 2024-12-28 11:37 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

If we add such a connection property, then it might be considered a CVE. For instance, we had to remove a property for log configuration.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException
@ 2024-12-28 11:49 ` "davecramer (@davecramer)" <[email protected]>
  4 siblings, 0 replies; 6+ messages in thread

From: davecramer (@davecramer) @ 2024-12-28 11:49 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

The log configuration was for creating a file. 
Is there a way to configure it using logging configuration ? Can you for instance provide a class in the logging configuration which would be loaded if someone were to change the configuration ?

Otherwise, I don't see a way to do this.

^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2024-12-28 11:49 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-02-18 17:40 [pgjdbc/pgjdbc] issue #753: Implement a connection property to add SQL text and bind values to PSQLException "vlsi (@vlsi)" <[email protected]>
2024-12-25 11:21 ` "Shanayshah44 (@Shanayshah44)" <[email protected]>
2024-12-28 04:26 ` "Shanayshah44 (@Shanayshah44)" <[email protected]>
2024-12-28 11:31 ` "davecramer (@davecramer)" <[email protected]>
2024-12-28 11:37 ` "vlsi (@vlsi)" <[email protected]>
2024-12-28 11:49 ` "davecramer (@davecramer)" <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox