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

Postgres: =~ with a negated bracket expression does not match a line break

Offen
#108 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
3-5 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
postgresql, python
Bereich
backend, databases

Rechercherichtung

Start by reading the =~ compilation path and the existing (?m) anchor fix mentioned in the issue. Check how the generated pattern behaves in Postgres for dots, negated bracket expressions, and Java-style escapes, then add the stated regression case to liberation-data/drivine-cypher-spec. Done when the Postgres result matches Neo4j, Oracle, and SQLite for the example.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

On Postgres, compiled Cypher's =~ runs the pattern in Postgres's partial newline-sensitive mode ((?p)), so that a dot matches no line break, as Java's does. That mode also stops a negated bracket expression from matching a line break, which Java's does:

RETURN 'a\nb' =~ 'a[^x]b'

Neo4j (Java's matches()) gives true; Postgres gives false. Oracle and SQLite give true.

No Postgres mode both keeps a dot off a line break and lets a negated bracket match one, so a fix would mean rewriting the pattern: each unescaped . outside a bracket as [^\n] (and \N-style escapes as Java reads them), with the pattern run in Postgres's default mode, and (?s) leaving the dots alone.

Found by a review of the (?m) anchor fix. A spec case ('a\nb' =~ 'a[^x]b' is true) should go into liberation-data/drivine-cypher-spec with the fix.

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.