Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5111

Named parameter support breaks with postgres casting syntax

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8.2, 1.8.6, 2.0-beta-3
    • 2.0-rc-1, 1.8.7
    • SQL processing
    • None

    Description

      Postgres supports a casting syntax like "SELECT '2011-01-01'::date". I recently wrote a query like: "SELECT * FROM table WHERE my_date BETWEEN ?-'1 week'::interval AND ?" and was surprised to receive strange errors about java.sql.Date not supporting the "interval" property. It would appear that the regex parsing that identifies named parameters is a bit broken in this instance.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            paulk Paul King
            hollandlef Lucian Holland
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment