> This seems strange:
>
> nconway=> create table ddd\\bar;
> Invalid command \. Try \? for help.
> nconway-> select 1;
Notice ..^ secondary prompt here
Try \e between these two commands to see the
current query buffer.
> ERROR: parser: parse error at or near "select"
>
Because your query is actually:
CREATE TABLE ddd SELECT 1;
Try this:
CREATE TABLE ddd \d
(i int)
\e
OR
CREATE TABLE ddd\\bar;
\e
Or, are you saying you want to be able to create a table
with a backslash in the name by escaping the backslash?
If so, you can use:
CREATE TABLE "ddd\bar" (i int);