Possible FAQs: single-quote and rename database - Mailing list pgsql-general

From Nathan L. Cutler
Subject Possible FAQs: single-quote and rename database
Date
Msg-id 19991223074107.A12201@iol.cz
Whole thread Raw
In response to Re: [GENERAL] char(xx) problem  (Gene Selkov <selkovjr@mcs.anl.gov>)
Responses Re: [GENERAL] Possible FAQs: single-quote and rename database  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-general
Hello:

I have two questions that might be FAQs (apologies in advance):

(1) Why does the parser choke on backslashed single-quote characters?  Or,
in other words, why doesn't this work:

testing=> \d bubba
Table    = bubba
+--------------------------+----------------------------------+-------+
|          Field           |              Type                | Length|
+--------------------------+----------------------------------+-------+
| litbub                   | varchar()                        | 60    |
+--------------------------+----------------------------------+-------+
testing=> insert '\'' into bubba;
ERROR:  parser: parse error at or near "'"

(2) How does one rename a database?  Other than dump/destroydb/restore,
obviously.

TIA

--
Nathan L. Cutler < livingston @ iol.cz >         telephone: +420-2-51611648
Livingston Professional Translations         fax:       +420-2-6514377
** When "pretty good" is not enough **           Prague, Czech Republic

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] shared memory - progress
Next
From: "Nikolay Mijaylov"
Date:
Subject: Re: [GENERAL] char(xx) problem