pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
[pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
13+ messages / 3 participants
[nested] [flat]

* [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-13 23:00 "raminorujov (@raminorujov)" <[email protected]>
  0 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-13 23:00 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Fixed parsing comment in callable statement causing syntax issue and preventing registration of out param

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing](https://github.com/pgjdbc/pgjdbc/blob/master/CONTRIBUTING.md) document?
* [x] Have you checked to ensure there aren't other open [Pull Requests](../../pulls) for the same update/change?

<!-- You can erase any parts of this template not applicable to your Pull Request. -->

### New Feature Submissions:

1. [x] Does your submission pass tests?
2. [x] Does `./gradlew styleCheck` pass ?
3. [x] Have you added your new test classes to an existing test suite in alphabetical order?

### Changes to Existing Features:

* [ ] Does this break existing behaviour? If so please explain.
* [x] Have you added an explanation of what your changes do and why you'd like us to include them?
* [x] Have you written new tests for your core changes, as applicable?
* [x] Have you successfully run tests with your changes locally?


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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 15:40 ` "davecramer (@davecramer)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: davecramer (@davecramer) @ 2025-07-14 15:40 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

lgtm @vlsi  ?

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:01 ` "vlsi (@vlsi)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: vlsi (@vlsi) @ 2025-07-14 16:01 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

If we ever support comments there, is there a reason we allow only block comments? Why don't we support line comments as well?

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:03 ` "vlsi (@vlsi)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: vlsi (@vlsi) @ 2025-07-14 16:03 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/CallableStmtTest.java)

Have you considered `@ValueSource(strings=...)`?
`delimiter=#` looks somewhat excessive

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:07 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-14 16:07 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/test/java/org/postgresql/test/jdbc2/CallableStmtTest.java)

I've used original sample test from bug report, Implemented your suggestion.

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:08 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-14 16:08 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> If we ever support comments there, is there a reason we allow only block comments? Why don't we support line comments as well?

Do you want me to implement this? `A comment is an arbitrary sequence of characters beginning with double dashes and extending to the end of the line`:
```
-- This is a standard SQL comment
```

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:25 ` "davecramer (@davecramer)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: davecramer (@davecramer) @ 2025-07-14 16:25 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> > If we ever support comments there, is there a reason we allow only block comments? Why don't we support line comments as well?
> 
> Do you want me to implement this? `A comment is an arbitrary sequence of characters beginning with double dashes and extending to the end of the line`:
> 
> ```
> -- This is a standard SQL comment
> ```

it wouldn't hurt to implement it.

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-14 16:28 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-14 16:28 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> > > If we ever support comments there, is there a reason we allow only block comments? Why don't we support line comments as well?
> > 
> > 
> > Do you want me to implement this? `A comment is an arbitrary sequence of characters beginning with double dashes and extending to the end of the line`:
> > ```
> > -- This is a standard SQL comment
> > ```
> 
> it wouldn't hurt to implement it.

Ok, will do. Thanks you.

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-15 08:27 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-15 08:27 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

Hi, @davecramer @vlsi I've implemented line comment parsing in various positions, please, review latest changes. Thanks.

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-16 16:41 ` "vlsi (@vlsi)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: vlsi (@vlsi) @ 2025-07-16 16:41 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/core/Parser.java)

Please avoid repeated `toCharArray()` in a loop

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-16 16:46 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-16 16:46 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

(on pgjdbc/src/main/java/org/postgresql/core/Parser.java)

Thanks, good suggestion, refactored.

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-16 16:51 ` "vlsi (@vlsi)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: vlsi (@vlsi) @ 2025-07-16 16:51 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

@raminorujov , could you factor "whitespace+block comment+line comment" in a method so it could be consistently used when whitespace skip is needed?

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

* Re: [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement
@ 2025-07-16 16:54 ` "raminorujov (@raminorujov)" <[email protected]>
  11 siblings, 0 replies; 13+ messages in thread

From: raminorujov (@raminorujov) @ 2025-07-16 16:54 UTC (permalink / raw)
  To: pgjdbc/pgjdbc <[email protected]>

> @raminorujov , could you factor "whitespace+block comment+line comment" in a method so it could be consistently used when whitespace skip is needed?

Sure, will do.

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


end of thread, other threads:[~2025-07-16 16:54 UTC | newest]

Thread overview: 13+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-13 23:00 [pgjdbc/pgjdbc] PR #3727: Fixed issue #2538: parsing comment in callable statement "raminorujov (@raminorujov)" <[email protected]>
2025-07-14 15:40 ` "davecramer (@davecramer)" <[email protected]>
2025-07-14 16:01 ` "vlsi (@vlsi)" <[email protected]>
2025-07-14 16:03 ` "vlsi (@vlsi)" <[email protected]>
2025-07-14 16:07 ` "raminorujov (@raminorujov)" <[email protected]>
2025-07-14 16:08 ` "raminorujov (@raminorujov)" <[email protected]>
2025-07-14 16:25 ` "davecramer (@davecramer)" <[email protected]>
2025-07-14 16:28 ` "raminorujov (@raminorujov)" <[email protected]>
2025-07-15 08:27 ` "raminorujov (@raminorujov)" <[email protected]>
2025-07-16 16:41 ` "vlsi (@vlsi)" <[email protected]>
2025-07-16 16:46 ` "raminorujov (@raminorujov)" <[email protected]>
2025-07-16 16:51 ` "vlsi (@vlsi)" <[email protected]>
2025-07-16 16:54 ` "raminorujov (@raminorujov)" <[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