Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#108 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
postgresql, python
領域
backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Python
スター
1
フォーク
0
平均マージ
1時間 19分
マージ済み PR(30日)
122

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

liberation-data/drivine-python のほかの issue

liberation-data/drivine-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。