Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

=~ with (?x) and a pattern that ends in a # comment fails on Postgres and SQLite, and is false on Oracle

Offen
#115 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
57/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
postgresql, python, sqlite
Bereich
databases

Rechercherichtung

Read the Cypher compilation path that wraps =~ patterns and handles flags, then check the database-specific behavior described for Postgres, SQLite, and Oracle. Reproduce the supplied (?x) example and add the stated spec case to liberation-data/drivine-cypher-spec. Done means the case returns true across the affected stores, including Oracle's handling of # comments.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

In compiled Cypher, =~ wraps the pattern in a group of its own and appends the closing parenthesis and the end anchor on the same line: \A( … )\Z on Postgres, \A( … )\z on Oracle, ^(?: … )\z on SQLite. Under (?x), a # starts a comment that runs to the end of the line, so a pattern that ends in a comment comments out what was appended:

RETURN 'ab' =~ '(?x)ab # c'
Store Gives
Neo4j (Java's matches()) true
Postgres error: invalid regular expression: parentheses () not balanced
SQLite error: Unclosed group (Java's PatternSyntaxException)
Oracle false: its x ignores whitespace but takes # literally

'(?x)a b' (no comment) already gives true on Postgres and Oracle.

A fix would put a line break before what is appended when the flags hold x, which ends the comment and, under x, is otherwise ignored. Oracle would also need its # comments taken out, as its x doesn't read them. A spec case ('ab' =~ '(?x)ab # c' is true) should go into liberation-data/drivine-cypher-spec with the fix.

Checked directly on Postgres 17, Oracle Free 23 and Java 25.

Vorherrschende Sprache
Python
Sterne
1
Forks
0
Ø Merge
1 Std. 21 Min.
Gemergte PRs (30 T.)
128

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus liberation-data/drivine-python

Alle Issues in liberation-data/drivine-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.