dollar quoting and pg_dump

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Postgresql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: dollar quoting and pg_dump
Date: 2004-03-23 15:08:54
Message-ID: 40605306.5040603@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


I had a brief look at this today. Basically, I thought of adding a new
routine to dumputils.c thus:

void appendStringLiteralDQ(PQExpBuffer buf, const char *str, const
char *dqprefix)

and using it in dumping function bodies and comments on all objects,
with a prefix argument of "function" and "comment" respectively. There
might be other places where we want to use dollar quoting, but this
would be a good start, ISTM.

Basically, this routine would start with $ (+ dqprefix if not null) and
then keep adding characters (in turn "_1234567890") until that string
was not found in str, then appending "$" and using that as the delimiter.

Thoughts?

cheers

andrew

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-03-23 15:28:16 Re: dollar quoting and pg_dump
Previous Message Shachar Shemesh 2004-03-23 14:54:21 postgres on windows page update

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-03-23 15:28:16 Re: dollar quoting and pg_dump
Previous Message Tom Lane 2004-03-23 15:01:42 Re: Initial eventlog support on win32