How to recognize PG SQL files? - Mailing list pgsql-general

From Joel Burton
Subject How to recognize PG SQL files?
Date
Msg-id 1060188951.2012.10.camel@localhost.localdomain
Whole thread Raw
Responses Re: How to recognize PG SQL files?  (elein <elein@norcov.com>)
Re: How to recognize PG SQL files?  (perltastic <perltastic@yahoo.com>)
{REPOST, CLARIFIED} How to recognize PG SQL files?  (Joel Burton <joel@joelburton.com>)
List pgsql-general
I'm writing a syntax mode for PG for Vim (posted an early version
earlier today) and would like to have Vim recognize that this is a PG
SQL file (rather than a MySQL file or an Oracle file or such).

I'm trying to brainstorm what the unique-looking parts of PG's syntax
are. These need to be present in PG SQL files (& hopefully not too
obscure) but not present in other DB SQL files.

The PG manual states how PG differs from SQL standards, but not how it
differs from other popular databases. I've used MySQL and Oracle in the
past, but not recently, and haven't use DB2 or SQLServer in ages and
don't have docs for them anymore.

I have a few possible suggestions. Can anyone:

* tell me if these are used in other DB systems (& shouldn't be part of
my syntax)

or

* provide other ideas for unique PG syntax


My ideas:

* \connect

* template1

* "from pg_" (selecting from a PG system table)

* "create rule"

* plpgsql, plperl, plpython, pltcl, pltclu, plruby (& now plphp, too, I
suppose! ;) )

* "nextval(", "currval("


I'd love to find something common, like "SERIAL" or "CREATE SEQUENCE" or
such, but I suspect that other commonly-used databases use these.

Thanks for any help!



pgsql-general by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: tsearch2: Error: Word is too long
Next
From: psql-mail@freeuk.com
Date:
Subject: Re: tsearch2: Error: Word is too long