Perhaps the simplest thing would be to have
people start out the files with
-- pgsql
If they didn't want to do that, they could set the
syntax by hand.
On the other hand, I just put my pgsql syntax
into the sql syntax file :-)
There is no guarantee that any particular pgsqlism
is in any sql script.
elein
PS: If you get the syntax working for function definitions,
I and many others will owe you undying gratitude.
On Wed, Aug 06, 2003 at 12:55:52PM -0400, Joel Burton wrote:
> 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!
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>