Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#108 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
postgresql, python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
1
Forks
0
Merge medio
1 h 21 min
PR fusionados (30 d)
128

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de liberation-data/drivine-python

Todos los issues de liberation-data/drivine-python

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.