Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Updated .vim file



On Tue, Oct 30, 2007 at 01:58:29PM -0500, Decibel! wrote:
> Does anyone have a .vim file that takes dollar quoting into account?
> I've tried the one mentioned at
> http://archives.postgresql.org/pgsql-general/2006-04/msg01266.php , but
> it doesn't appear to understand dollar quotes.

The magic appears to be something like:

:syn match pgsqlMyMatch /\$\$.\{.}\$\$/

The real regex would look a lot hairier for arbitrary legal dollar
quoting constructs, but if you standardize on something like what's
below, it should be easier.

Cheers,
David.

CREATE [OR REPLACE] FUNCTION foo(
    input,
    params,
    here,
    [OUT put_params_here,
    ...]
)
RETURNS [SETOF] SOMETYPE
[IMMUTABLE]
[STRICT]
LANGUAGE plbar
AS $[STUFF]$
...
$[STUFF]$;
-- 
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david(dot)fetter(at)gmail(dot)com

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group