pygments-main / pygments / lexers /

Diff from to

File pygments/lexers/

+# -*- coding: utf-8 -*-
     Lexers for PostgreSQL-specific SQL and psql interactive session.
-    :copyright: Copyright 2011 by Daniele Varrazzo.
-    :license: BSD, see LICENSE for details.
-    The module contains lexers related to PostgreSQL languages.
         A SQL lexer for the PostgreSQL dialect. Differences w.r.t. the SQL
         lexer are:
     The ``tests/examplefiles`` contains a few test files with data to be
     parsed by these lexers.
+    :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
+    :license: BSD, see LICENSE for details.
 import re
-import sys
 from copy import deepcopy
-from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, \
-     this, do_insertions
-from pygments.token import Error, Punctuation, Literal, Token, \
+from pygments.lexer import Lexer, RegexLexer, do_insertions
+from pygments.token import Punctuation, \
      Text, Comment, Operator, Keyword, Name, String, Number, Generic
 from pygments.lexers import get_lexer_by_name, ClassNotFound
-from pygments.lexers._postgres_builtins import (
+from pygments.lexers._postgres_builtins import KEYWORDS, DATATYPES, \
-__all__ = [ 'PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer' ]
+__all__ = ['PostgresLexer', 'PlPgsqlLexer', 'PostgresConsoleLexer']
 line_re  = re.compile('.*?\n')
         yield (match.start(), String,
 class PostgresBase(object):
     """Base class for Postgres-related lexers.
             # print >>sys.stderr, "language not found:", lang
             return None
 class PostgresLexer(PostgresBase, RegexLexer):
     Lexer for the PostgreSQL dialect of SQL.
+    *New in Pygments 1.5.*
     name = 'PostgreSQL SQL dialect'
 class PlPgsqlLexer(PostgresBase, RegexLexer):
     Handle the extra syntax in Pl/pgSQL language.
+    *New in Pygments 1.5.*
     name = 'PL/pgSQL'
     aliases = ['plpgsql']
     This is not a complete psql lexer yet as it lacks prompt support
     and output rendering.
     name = 'PostgreSQL console - regexp based lexer'
     aliases = []    # not public
 class PostgresConsoleLexer(Lexer):
     Lexer for psql sessions.
+    *New in Pygments 1.5.*
     name = 'PostgreSQL console (psql)'
                     yield (mmsg.start(2), out_token,
                     yield (0, out_token, line)