unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] sql: add missing postgresql types
@ 2023-04-16 13:38 Nicolas Martyanoff
  2023-04-16 13:41 ` Nicolas Martyanoff
  2023-04-17  9:12 ` Robert Pluim
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Martyanoff @ 2023-04-16 13:38 UTC (permalink / raw)
  To: emacs-devel; +Cc: Nicolas Martyanoff

* lisp/progmodes/sql.el: Add multiple missing PostgreSQL types: bigserial,
smallserial, macaddr8, jsonb, jsonpath, built-in range types, object
identifier types (oid & co).
---
 lisp/progmodes/sql.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index d8bd6bc2685..75d0cbbb367 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -2192,14 +2192,17 @@ sql-mode-postgres-font-lock-keywords
 
      ;; Postgres Data Types
      (sql-font-lock-keywords-builder 'font-lock-type-face nil
-"bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char"
-"character" "cidr" "circle" "date" "decimal" "double" "float4"
-"float8" "inet" "int" "int2" "int4" "int8" "integer" "interval" "line"
-"lseg" "macaddr" "money" "name" "numeric" "path" "point" "polygon"
-"precision" "real" "serial" "serial4" "serial8" "sequences" "smallint" "text"
-"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsvector"
-"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without"
-"xml" "zone"
+ "bigint" "bigserial" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char"
+"character" "cidr" "circle" "date" "daterange" "decimal" "double" "float4"
+"float8" "inet" "int" "int2" "int4" "int4range" "int8" "int8range" "integer"
+"interval" "jsonb" "jsonpath" "line" "lseg" "macaddr" "macaddr8" "money"
+"name" "numeric" "numrange" "oid" "path" "point" "polygon" "precision" "real"
+"regclass" "regcollation" "regconfig" "regdictionary" "regnamespace "
+"regoper" "regoperator" "regproc" "regprocedure" "regrole" "regtype"
+"sequences" "serial" "serial4" "serial8" "smallint" "smallserial" "text"
+"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsrange" "tstzrange"
+"tsvector" "txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying"
+"without" "xml" "zone"
 )))
 
   "Postgres SQL keywords used by font-lock.
-- 
2.39.2




^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sql: add missing postgresql types
  2023-04-16 13:38 [PATCH] sql: add missing postgresql types Nicolas Martyanoff
@ 2023-04-16 13:41 ` Nicolas Martyanoff
  2023-04-17  9:12 ` Robert Pluim
  1 sibling, 0 replies; 5+ messages in thread
From: Nicolas Martyanoff @ 2023-04-16 13:41 UTC (permalink / raw)
  To: Nicolas Martyanoff; +Cc: emacs-devel


Based on emacs-29. No code change, just some missing PostgreSQL types
including the extremely common JSONB.

This time I was careful about the Changelog format for the commit
message :)

Regards,

-- 
Nicolas Martyanoff
https://n16f.net
nicolas@n16f.net



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sql: add missing postgresql types
  2023-04-16 13:38 [PATCH] sql: add missing postgresql types Nicolas Martyanoff
  2023-04-16 13:41 ` Nicolas Martyanoff
@ 2023-04-17  9:12 ` Robert Pluim
  2023-04-17 10:18   ` Nicolas Martyanoff
  1 sibling, 1 reply; 5+ messages in thread
From: Robert Pluim @ 2023-04-17  9:12 UTC (permalink / raw)
  To: Nicolas Martyanoff; +Cc: emacs-devel

>>>>> On Sun, 16 Apr 2023 15:38:43 +0200, Nicolas Martyanoff <nicolas@n16f.net> said:

    Nicolas> * lisp/progmodes/sql.el: Add multiple missing PostgreSQL types: bigserial,
    Nicolas> smallserial, macaddr8, jsonb, jsonpath, built-in range types, object
    Nicolas> identifier types (oid & co).
    Nicolas> ---
    Nicolas>  lisp/progmodes/sql.el | 19 +++++++++++--------
    Nicolas>  1 file changed, 11 insertions(+), 8 deletions(-)

    Nicolas> diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
    Nicolas> index d8bd6bc2685..75d0cbbb367 100644
    Nicolas> --- a/lisp/progmodes/sql.el
    Nicolas> +++ b/lisp/progmodes/sql.el
    Nicolas> @@ -2192,14 +2192,17 @@ sql-mode-postgres-font-lock-keywords
 
    Nicolas>       ;; Postgres Data Types
    Nicolas>       (sql-font-lock-keywords-builder 'font-lock-type-face nil
    Nicolas> -"bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char"
    Nicolas> -"character" "cidr" "circle" "date" "decimal" "double" "float4"
    Nicolas> -"float8" "inet" "int" "int2" "int4" "int8" "integer" "interval" "line"
    Nicolas> -"lseg" "macaddr" "money" "name" "numeric" "path" "point" "polygon"
    Nicolas> -"precision" "real" "serial" "serial4" "serial8" "sequences" "smallint" "text"
    Nicolas> -"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsvector"
    Nicolas> -"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without"
    Nicolas> -"xml" "zone"
    Nicolas> + "bigint" "bigserial" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char"
    Nicolas> +"character" "cidr" "circle" "date" "daterange" "decimal" "double" "float4"
    Nicolas> +"float8" "inet" "int" "int2" "int4" "int4range" "int8" "int8range" "integer"
    Nicolas> +"interval" "jsonb" "jsonpath" "line" "lseg" "macaddr" "macaddr8" "money"
    Nicolas> +"name" "numeric" "numrange" "oid" "path" "point" "polygon" "precision" "real"
    Nicolas> +"regclass" "regcollation" "regconfig" "regdictionary" "regnamespace "
    Nicolas> +"regoper" "regoperator" "regproc" "regprocedure" "regrole" "regtype"
    Nicolas> +"sequences" "serial" "serial4" "serial8" "smallint" "smallserial" "text"
    Nicolas> +"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsrange" "tstzrange"
    Nicolas> +"tsvector" "txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying"
    Nicolas> +"without" "xml" "zone"
    Nicolas>  )))

You have 'bigserial' in there twice.

Robert
-- 



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sql: add missing postgresql types
  2023-04-17  9:12 ` Robert Pluim
@ 2023-04-17 10:18   ` Nicolas Martyanoff
  2023-04-20  7:52     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Martyanoff @ 2023-04-17 10:18 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Nicolas Martyanoff, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 117 bytes --]

Robert Pluim <rpluim@gmail.com> writes:
> You have 'bigserial' in there twice.

Good catch. Updated patch attached.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-sql-add-missing-postgresql-types.patch --]
[-- Type: text/x-patch, Size: 2115 bytes --]

From dd6076f341a9fa479c520353bb6196ea3d46ff78 Mon Sep 17 00:00:00 2001
From: Nicolas Martyanoff <nicolas@n16f.net>
Date: Sun, 16 Apr 2023 15:30:47 +0200
Subject: [PATCH] sql: add missing postgresql types

* lisp/progmodes/sql.el: Add multiple missing PostgreSQL types: bigserial,
smallserial, macaddr8, jsonb, jsonpath, built-in range types, object
identifier types (oid & co).
---
 lisp/progmodes/sql.el | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el
index d8bd6bc2685..c6667c075f6 100644
--- a/lisp/progmodes/sql.el
+++ b/lisp/progmodes/sql.el
@@ -2192,14 +2192,17 @@ sql-mode-postgres-font-lock-keywords
 
      ;; Postgres Data Types
      (sql-font-lock-keywords-builder 'font-lock-type-face nil
-"bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char"
-"character" "cidr" "circle" "date" "decimal" "double" "float4"
-"float8" "inet" "int" "int2" "int4" "int8" "integer" "interval" "line"
-"lseg" "macaddr" "money" "name" "numeric" "path" "point" "polygon"
-"precision" "real" "serial" "serial4" "serial8" "sequences" "smallint" "text"
-"time" "timestamp" "timestamptz" "timetz" "tsquery" "tsvector"
-"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without"
-"xml" "zone"
+ "bigint" "bigserial" "bit" "bool" "boolean" "box" "bytea" "char" "character"
+"cidr" "circle" "date" "daterange" "decimal" "double" "float4" "float8" "inet"
+"int" "int2" "int4" "int4range" "int8" "int8range" "integer" "interval"
+"jsonb" "jsonpath" "line" "lseg" "macaddr" "macaddr8" "money" "name" "numeric"
+"numrange" "oid" "path" "point" "polygon" "precision" "real" "regclass"
+"regcollation" "regconfig" "regdictionary" "regnamespace " "regoper"
+"regoperator" "regproc" "regprocedure" "regrole" "regtype" "sequences"
+"serial" "serial4" "serial8" "smallint" "smallserial" "text" "time"
+"timestamp" "timestamptz" "timetz" "tsquery" "tsrange" "tstzrange" "tsvector"
+"txid_snapshot" "unknown" "uuid" "varbit" "varchar" "varying" "without" "xml"
+"zone"
 )))
 
   "Postgres SQL keywords used by font-lock.
-- 
2.39.2


[-- Attachment #3: Type: text/plain, Size: 58 bytes --]


-- 
Nicolas Martyanoff
https://n16f.net
nicolas@n16f.net

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sql: add missing postgresql types
  2023-04-17 10:18   ` Nicolas Martyanoff
@ 2023-04-20  7:52     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2023-04-20  7:52 UTC (permalink / raw)
  To: Nicolas Martyanoff; +Cc: rpluim, emacs-devel

> From: Nicolas Martyanoff <nicolas@n16f.net>
> Cc: Nicolas Martyanoff <nicolas@n16f.net>,  emacs-devel@gnu.org
> Date: Mon, 17 Apr 2023 12:18:11 +0200
> 
> Robert Pluim <rpluim@gmail.com> writes:
> > You have 'bigserial' in there twice.
> 
> Good catch. Updated patch attached.

Thanks, installed on the emacs-29 branch.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-20  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-16 13:38 [PATCH] sql: add missing postgresql types Nicolas Martyanoff
2023-04-16 13:41 ` Nicolas Martyanoff
2023-04-17  9:12 ` Robert Pluim
2023-04-17 10:18   ` Nicolas Martyanoff
2023-04-20  7:52     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).