Variable: sql-product-alist

sql-product-alist is a variable defined in sql.el.gz.

Value

Large value
((ansi :name "ANSI" :font-lock sql-mode-ansi-font-lock-keywords
       :statement sql-ansi-statement-starters)
 (db2 :name "DB2" :font-lock sql-mode-db2-font-lock-keywords
      :sqli-program sql-db2-program :sqli-options sql-db2-options
      :sqli-login sql-db2-login-params :sqli-comint-func
      sql-comint-db2 :prompt-regexp "^db2 => " :prompt-length 7
      :prompt-cont-regexp "^db2 (cont\\.) => " :input-filter
      sql-escape-newlines-filter)
 (informix :name "Informix" :font-lock
	   sql-mode-informix-font-lock-keywords :sqli-program
	   sql-informix-program :sqli-options sql-informix-options
	   :sqli-login sql-informix-login-params :sqli-comint-func
	   sql-comint-informix :prompt-regexp "^> " :prompt-length 2
	   :syntax-alist ((123 . "<") (125 . ">")))
 (ingres :name "Ingres" :font-lock sql-mode-ingres-font-lock-keywords
	 :sqli-program sql-ingres-program :sqli-options
	 sql-ingres-options :sqli-login sql-ingres-login-params
	 :sqli-comint-func sql-comint-ingres :prompt-regexp "^\\* "
	 :prompt-length 2 :prompt-cont-regexp "^\\* ")
 (interbase :name "Interbase" :font-lock
	    sql-mode-interbase-font-lock-keywords :sqli-program
	    sql-interbase-program :sqli-options sql-interbase-options
	    :sqli-login sql-interbase-login-params :sqli-comint-func
	    sql-comint-interbase :prompt-regexp "^SQL> "
	    :prompt-length 5)
 (linter :name "Linter" :font-lock sql-mode-linter-font-lock-keywords
	 :sqli-program sql-linter-program :sqli-options
	 sql-linter-options :sqli-login sql-linter-login-params
	 :sqli-comint-func sql-comint-linter :prompt-regexp "^SQL>"
	 :prompt-length 4)
 (mariadb :name "MariaDB" :free-software t :font-lock
	  sql-mode-mariadb-font-lock-keywords :sqli-program
	  sql-mariadb-program :sqli-options sql-mariadb-options
	  :sqli-login sql-mariadb-login-params :sqli-comint-func
	  sql-comint-mariadb :list-all "SHOW TABLES;" :list-table
	  "DESCRIBE %s;" :prompt-regexp "^MariaDB \\[.*]> "
	  :prompt-cont-regexp "^    [\"'`-]> " :syntax-alist
	  ((35 . "< b")) :input-filter sql-remove-tabs-filter)
 (ms :name "Microsoft" :font-lock sql-mode-ms-font-lock-keywords
     :sqli-program sql-ms-program :sqli-options sql-ms-options
     :sqli-login sql-ms-login-params :sqli-comint-func sql-comint-ms
     :prompt-regexp "^[0-9]*>" :prompt-cont-regexp "^[0-9]*>"
     :prompt-length 5 :syntax-alist ((64 . "_")) :terminator
     ("^go" . "go"))
 (mysql :name "MySQL" :free-software t :font-lock
	sql-mode-mysql-font-lock-keywords :sqli-program
	sql-mysql-program :sqli-options sql-mysql-options :sqli-login
	sql-mysql-login-params :sqli-comint-func sql-comint-mysql
	:list-all "SHOW TABLES;" :list-table "DESCRIBE %s;"
	:prompt-regexp "^mysql> " :prompt-length 6 :prompt-cont-regexp
	"^    -> " :syntax-alist ((35 . "< b") (92 . "\\"))
	:input-filter sql-remove-tabs-filter)
 (oracle :name "Oracle" :font-lock sql-mode-oracle-font-lock-keywords
	 :sqli-program sql-oracle-program :sqli-options
	 sql-oracle-options :sqli-login sql-oracle-login-params
	 :sqli-comint-func sql-comint-oracle :list-all
	 sql-oracle-list-all :list-table sql-oracle-list-table
	 :completion-object sql-oracle-completion-object
	 :prompt-regexp "^SQL> " :prompt-length 5 :prompt-cont-regexp
	 "^\\(?:[ ][ ][1-9]\\|[ ][1-9][0-9]\\|[1-9][0-9]\\{2\\}\\)[ ]\\{2\\}"
	 :statement sql-oracle-statement-starters :syntax-alist
	 ((36 . "_") (35 . "_")) :terminator ("\\(^/\\|;\\)" . "/")
	 :input-filter sql-placeholders-filter)
 (postgres :name "Postgres" :free-software t :font-lock
	   sql-mode-postgres-font-lock-keywords :sqli-program
	   sql-postgres-program :sqli-options sql-postgres-options
	   :sqli-login sql-postgres-login-params :sqli-comint-func
	   sql-comint-postgres :list-all ("\\d+" . "\\dS+")
	   :list-table ("\\d+ %s" . "\\dS+ %s") :completion-object
	   sql-postgres-completion-object :prompt-regexp
	   "^[-[:alnum:]_]*[-=][#>] " :prompt-length 5
	   :prompt-cont-regexp "^[-[:alnum:]_]*[-'(][#>] " :statement
	   sql-postgres-statement-starters :input-filter
	   sql-remove-tabs-filter :terminator
	   ("\\(^\\s-*\\\\g\\|;\\)" . "\\g"))
 (solid :name "Solid" :font-lock sql-mode-solid-font-lock-keywords
	:sqli-program sql-solid-program :sqli-options
	sql-solid-options :sqli-login sql-solid-login-params
	:sqli-comint-func sql-comint-solid :prompt-regexp "^"
	:prompt-length 0)
 (sqlite :name "SQLite" :free-software t :font-lock
	 sql-mode-sqlite-font-lock-keywords :sqli-program
	 sql-sqlite-program :sqli-options sql-sqlite-options
	 :sqli-login sql-sqlite-login-params :sqli-comint-func
	 sql-comint-sqlite :list-all ".tables" :list-table
	 ".schema %s" :completion-object sql-sqlite-completion-object
	 :prompt-regexp "^sqlite> " :prompt-length 8
	 :prompt-cont-regexp "^   \\.\\.\\.> ")
 (sybase :name "Sybase" :font-lock sql-mode-sybase-font-lock-keywords
	 :sqli-program sql-sybase-program :sqli-options
	 sql-sybase-options :sqli-login sql-sybase-login-params
	 :sqli-comint-func sql-comint-sybase :prompt-regexp "^SQL> "
	 :prompt-length 5 :syntax-alist ((64 . "_")) :terminator
	 ("^go" . "go"))
 (vertica :name "Vertica" :sqli-program sql-vertica-program
	  :sqli-options sql-vertica-options :sqli-login
	  sql-vertica-login-params :sqli-comint-func
	  sql-comint-vertica :list-all ("\\d" . "\\dS") :list-table
	  "\\d %s" :prompt-regexp "^[[:alnum:]_]*=[#>] "
	  :prompt-length 5 :prompt-cont-regexp
	  "^[[:alnum:]_]*[-(][#>] "))

Documentation

An alist of product specific configuration settings.

Without an entry in this list a product will not be properly highlighted and will not support sql-interactive-mode.

Each element in the list is in the following format:

 (PRODUCT FEATURE VALUE ...)

where PRODUCT is the appropriate value of sql-product. The product name is then followed by FEATURE-VALUE pairs. If a FEATURE is not specified, its VALUE is treated as nil. FEATURE may be any one of the following:

 :name string containing the displayable name of
                        the product.

 :free-software is the product Free (as in Freedom) software?

 :font-lock name of the variable containing the product
                        specific font lock highlighting patterns.

 :sqli-program name of the variable containing the product
                        specific interactive program name.

 :sqli-options name of the variable containing the list
                        of product specific options.

 :sqli-login name of the variable containing the list of
                        login parameters (i.e., user, password,
                        database and server) needed to connect to
                        the database.

 :sqli-comint-func function of two arguments, PRODUCT
                        and OPTIONS, that will open a comint buffer
                        and connect to the database. PRODUCT is the
                        first argument to be passed to sql-comint,
                        and OPTIONS should be included in its second
                        argument. The function should use the values
                        of sql-user, sql-password, sql-database,
                        sql-server and sql-port to . Do product
                        specific configuration of comint in this
                        function. See sql-comint-oracle for an
                        example of such a function.

 :list-all Command string or function which produces
                        a listing of all objects in the database.
                        If it's a cons cell, then the car
                        produces the standard list of objects and
                        the cdr produces an enhanced list of
                        objects. What "enhanced" means is
                        dependent on the SQL product and may not
                        exist. In general though, the
                        "enhanced" list should include visible
                        objects from other schemas.

 :list-table Command string or function which produces
                        a detailed listing of a specific database
                        table. If its a cons cell, then the car
                        produces the standard list and the cdr
                        produces an enhanced list.

 :completion-object A function that returns a list of
                        objects. Called with a single
                        parameter--if nil then list objects
                        accessible in the current schema, if
                        not-nil it is the name of a schema whose
                        objects should be listed.

 :completion-column A function that returns a list of
                        columns. Called with a single
                        parameter--if nil then list objects
                        accessible in the current schema, if
                        not-nil it is the name of a schema whose
                        objects should be listed.

 :prompt-regexp regular expression string that matches
                        the prompt issued by the product
                        interpreter.

 :prompt-length length of the prompt on the line.

 :prompt-cont-regexp regular expression string that matches
                        the continuation prompt issued by the
                        product interpreter.

 :input-filter function which can filter strings sent to
                        the command interpreter. It is also used
                        by the sql-send-string,
                        sql-send-region, sql-send-paragraph
                        and sql-send-buffer functions. The
                        function is passed the string sent to the
                        command interpreter and must return the
                        filtered string. May also be a list of
                        such functions.

 :statement name of a variable containing a regexp that
                        matches the beginning of SQL statements.

 :terminator the terminator to be sent after a
                        sql-send-string, sql-send-region,
                        sql-send-paragraph and
                        sql-send-buffer command. May be the
                        literal string or a cons of a regexp to
                        match an existing terminator in the
                        string and the terminator to be used if
                        its absent. By default ";".

 :syntax-alist alist of syntax table entries to enable
                        special character treatment by font-lock
                        and imenu.

Other features can be stored but they will be ignored. However, you can develop new functionality which is product independent by using sql-get-product-feature to lookup the product specific settings.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/sql.el.gz
(defvar sql-product-alist
  '((ansi
     :name "ANSI"
     :font-lock sql-mode-ansi-font-lock-keywords
     :statement sql-ansi-statement-starters)

    (db2
     :name "DB2"
     :font-lock sql-mode-db2-font-lock-keywords
     :sqli-program sql-db2-program
     :sqli-options sql-db2-options
     :sqli-login sql-db2-login-params
     :sqli-comint-func sql-comint-db2
     :prompt-regexp "^db2 => "
     :prompt-length 7
     :prompt-cont-regexp "^db2 (cont\\.) => "
     :input-filter sql-escape-newlines-filter)

    (informix
     :name "Informix"
     :font-lock sql-mode-informix-font-lock-keywords
     :sqli-program sql-informix-program
     :sqli-options sql-informix-options
     :sqli-login sql-informix-login-params
     :sqli-comint-func sql-comint-informix
     :prompt-regexp "^> "
     :prompt-length 2
     :syntax-alist ((?{ . "<") (?} . ">")))

    (ingres
     :name "Ingres"
     :font-lock sql-mode-ingres-font-lock-keywords
     :sqli-program sql-ingres-program
     :sqli-options sql-ingres-options
     :sqli-login sql-ingres-login-params
     :sqli-comint-func sql-comint-ingres
     :prompt-regexp "^\\* "
     :prompt-length 2
     :prompt-cont-regexp "^\\* ")

    (interbase
     :name "Interbase"
     :font-lock sql-mode-interbase-font-lock-keywords
     :sqli-program sql-interbase-program
     :sqli-options sql-interbase-options
     :sqli-login sql-interbase-login-params
     :sqli-comint-func sql-comint-interbase
     :prompt-regexp "^SQL> "
     :prompt-length 5)

    (linter
     :name "Linter"
     :font-lock sql-mode-linter-font-lock-keywords
     :sqli-program sql-linter-program
     :sqli-options sql-linter-options
     :sqli-login sql-linter-login-params
     :sqli-comint-func sql-comint-linter
     :prompt-regexp "^SQL>"
     :prompt-length 4)

    (mariadb
     :name "MariaDB"
     :free-software t
     :font-lock sql-mode-mariadb-font-lock-keywords
     :sqli-program sql-mariadb-program
     :sqli-options sql-mariadb-options
     :sqli-login sql-mariadb-login-params
     :sqli-comint-func sql-comint-mariadb
     :list-all "SHOW TABLES;"
     :list-table "DESCRIBE %s;"
     :prompt-regexp "^MariaDB \\[.*]> "
     :prompt-cont-regexp "^    [\"'`-]> "
     :syntax-alist ((?# . "< b"))
     :input-filter sql-remove-tabs-filter)

    (ms
     :name "Microsoft"
     :font-lock sql-mode-ms-font-lock-keywords
     :sqli-program sql-ms-program
     :sqli-options sql-ms-options
     :sqli-login sql-ms-login-params
     :sqli-comint-func sql-comint-ms
     :prompt-regexp "^[0-9]*>"
     :prompt-cont-regexp "^[0-9]*>"
     :prompt-length 5
     :syntax-alist ((?@ . "_"))
     :terminator ("^go" . "go"))

    (mysql
     :name "MySQL"
     :free-software t
     :font-lock sql-mode-mysql-font-lock-keywords
     :sqli-program sql-mysql-program
     :sqli-options sql-mysql-options
     :sqli-login sql-mysql-login-params
     :sqli-comint-func sql-comint-mysql
     :list-all "SHOW TABLES;"
     :list-table "DESCRIBE %s;"
     :prompt-regexp "^mysql> "
     :prompt-length 6
     :prompt-cont-regexp "^    -> "
     :syntax-alist ((?# . "< b") (?\\ . "\\"))
     :input-filter sql-remove-tabs-filter)

    (oracle
     :name "Oracle"
     :font-lock sql-mode-oracle-font-lock-keywords
     :sqli-program sql-oracle-program
     :sqli-options sql-oracle-options
     :sqli-login sql-oracle-login-params
     :sqli-comint-func sql-comint-oracle
     :list-all sql-oracle-list-all
     :list-table sql-oracle-list-table
     :completion-object sql-oracle-completion-object
     :prompt-regexp "^SQL> "
     :prompt-length 5
     :prompt-cont-regexp "^\\(?:[ ][ ][1-9]\\|[ ][1-9][0-9]\\|[1-9][0-9]\\{2\\}\\)[ ]\\{2\\}"
     :statement sql-oracle-statement-starters
     :syntax-alist ((?$ . "_") (?# . "_"))
     :terminator ("\\(^/\\|;\\)" . "/")
     :input-filter sql-placeholders-filter)

    (postgres
     :name "Postgres"
     :free-software t
     :font-lock sql-mode-postgres-font-lock-keywords
     :sqli-program sql-postgres-program
     :sqli-options sql-postgres-options
     :sqli-login sql-postgres-login-params
     :sqli-comint-func sql-comint-postgres
     :list-all ("\\d+" . "\\dS+")
     :list-table ("\\d+ %s" . "\\dS+ %s")
     :completion-object sql-postgres-completion-object
     :prompt-regexp "^[-[:alnum:]_]*[-=][#>] "
     :prompt-length 5
     :prompt-cont-regexp "^[-[:alnum:]_]*[-'(][#>] "
     :statement sql-postgres-statement-starters
     :input-filter sql-remove-tabs-filter
     :terminator ("\\(^\\s-*\\\\g\\|;\\)" . "\\g"))

    (solid
     :name "Solid"
     :font-lock sql-mode-solid-font-lock-keywords
     :sqli-program sql-solid-program
     :sqli-options sql-solid-options
     :sqli-login sql-solid-login-params
     :sqli-comint-func sql-comint-solid
     :prompt-regexp "^"
     :prompt-length 0)

    (sqlite
     :name "SQLite"
     :free-software t
     :font-lock sql-mode-sqlite-font-lock-keywords
     :sqli-program sql-sqlite-program
     :sqli-options sql-sqlite-options
     :sqli-login sql-sqlite-login-params
     :sqli-comint-func sql-comint-sqlite
     :list-all ".tables"
     :list-table ".schema %s"
     :completion-object sql-sqlite-completion-object
     :prompt-regexp "^sqlite> "
     :prompt-length 8
     :prompt-cont-regexp "^   \\.\\.\\.> ")

    (sybase
     :name "Sybase"
     :font-lock sql-mode-sybase-font-lock-keywords
     :sqli-program sql-sybase-program
     :sqli-options sql-sybase-options
     :sqli-login sql-sybase-login-params
     :sqli-comint-func sql-comint-sybase
     :prompt-regexp "^SQL> "
     :prompt-length 5
     :syntax-alist ((?@ . "_"))
     :terminator ("^go" . "go"))

    (vertica
     :name "Vertica"
     :sqli-program sql-vertica-program
     :sqli-options sql-vertica-options
     :sqli-login sql-vertica-login-params
     :sqli-comint-func sql-comint-vertica
     :list-all ("\\d" . "\\dS")
     :list-table "\\d %s"
     :prompt-regexp "^[[:alnum:]_]*=[#>] "
     :prompt-length 5
     :prompt-cont-regexp "^[[:alnum:]_]*[-(][#>] ")
    )
  "An alist of product specific configuration settings.

Without an entry in this list a product will not be properly
highlighted and will not support `sql-interactive-mode'.

Each element in the list is in the following format:

 (PRODUCT FEATURE VALUE ...)

where PRODUCT is the appropriate value of `sql-product'.  The
product name is then followed by FEATURE-VALUE pairs.  If a
FEATURE is not specified, its VALUE is treated as nil.  FEATURE
may be any one of the following:

 :name                  string containing the displayable name of
                        the product.

 :free-software         is the product Free (as in Freedom) software?

 :font-lock             name of the variable containing the product
                        specific font lock highlighting patterns.

 :sqli-program          name of the variable containing the product
                        specific interactive program name.

 :sqli-options          name of the variable containing the list
                        of product specific options.

 :sqli-login            name of the variable containing the list of
                        login parameters (i.e., user, password,
                        database and server) needed to connect to
                        the database.

 :sqli-comint-func      function of two arguments, PRODUCT
                        and OPTIONS, that will open a comint buffer
                        and connect to the database.  PRODUCT is the
                        first argument to be passed to `sql-comint',
                        and OPTIONS should be included in its second
                        argument.  The function should use the values
                        of `sql-user', `sql-password', `sql-database',
                        `sql-server' and `sql-port' to .  Do product
                        specific configuration of comint in this
                        function.  See `sql-comint-oracle' for an
                        example of such a function.

 :list-all              Command string or function which produces
                        a listing of all objects in the database.
                        If it's a cons cell, then the car
                        produces the standard list of objects and
                        the cdr produces an enhanced list of
                        objects.  What \"enhanced\" means is
                        dependent on the SQL product and may not
                        exist.  In general though, the
                        \"enhanced\" list should include visible
                        objects from other schemas.

 :list-table            Command string or function which produces
                        a detailed listing of a specific database
                        table.  If its a cons cell, then the car
                        produces the standard list and the cdr
                        produces an enhanced list.

 :completion-object     A function that returns a list of
                        objects.  Called with a single
                        parameter--if nil then list objects
                        accessible in the current schema, if
                        not-nil it is the name of a schema whose
                        objects should be listed.

 :completion-column     A function that returns a list of
                        columns.  Called with a single
                        parameter--if nil then list objects
                        accessible in the current schema, if
                        not-nil it is the name of a schema whose
                        objects should be listed.

 :prompt-regexp         regular expression string that matches
                        the prompt issued by the product
                        interpreter.

 :prompt-length         length of the prompt on the line.

 :prompt-cont-regexp    regular expression string that matches
                        the continuation prompt issued by the
                        product interpreter.

 :input-filter          function which can filter strings sent to
                        the command interpreter.  It is also used
                        by the `sql-send-string',
                        `sql-send-region', `sql-send-paragraph'
                        and `sql-send-buffer' functions.  The
                        function is passed the string sent to the
                        command interpreter and must return the
                        filtered string.  May also be a list of
                        such functions.

 :statement             name of a variable containing a regexp that
                        matches the beginning of SQL statements.

 :terminator            the terminator to be sent after a
                        `sql-send-string', `sql-send-region',
                        `sql-send-paragraph' and
                        `sql-send-buffer' command.  May be the
                        literal string or a cons of a regexp to
                        match an existing terminator in the
                        string and the terminator to be used if
                        its absent.  By default \";\".

 :syntax-alist          alist of syntax table entries to enable
                        special character treatment by font-lock
                        and imenu.

Other features can be stored but they will be ignored.  However,
you can develop new functionality which is product independent by
using `sql-get-product-feature' to lookup the product specific
settings.")