Re: pg_dumpall: does not exist database

Поиск
Список
Период
Сортировка
От Jim Buttafuoco
Тема Re: pg_dumpall: does not exist database
Дата
Msg-id 20060425154719.M97071@contactbda.com
обсуждение исходный текст
Ответ на Re: pg_dumpall: does not exist database  (Ari Kahn <akahn1@gmu.edu>)
Ответы Re: pg_dumpall: does not exist database  (Csaba Nagy <nagy@ecircle-ag.com>)
Список pgsql-general
just for the record the following also works

from the psql prompt:
jim=# create database "testing
jim"# ";
CREATE DATABASE
jim=# drop database "testing
jim"# "
jim-# ;
DROP DATABASE
jim=#

and from the unix shell:
createdb "testing
"
dropdb "testing
"

you need the double quotes in all cases


---------- Original Message -----------
From: Ari Kahn <akahn1@gmu.edu>
To: jim@contactbda.com
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Stephen Frost <sfrost@snowman.net>, pgsql-general@postgresql.org
Sent: Tue, 25 Apr 2006 11:19:57 -0400
Subject: Re: [GENERAL] pg_dumpall: does not exist database

> I would call you an genius, but ... :-)
>
> Anyway, that worked and is the solution!
> postgres=# update pg_database set datname='foodmart' where datname
> like 'foodmart%';
> UPDATE 1
> postgres=# drop database foodmart;
> DROP DATABASE
>
> THANKS!
>
> On Apr 25, 2006, at 11:13 AM, Jim Buttafuoco wrote:
>
> >
> > why not just
> >
> > update pg_database set datname='foodmart' where datname like
> > 'foodmart%';
> >
> >
> >
> > ---------- Original Message -----------
> > From: Ari Kahn <akahn1@gmu.edu>
> > To: Tom Lane <tgl@sss.pgh.pa.us>
> > Cc: Stephen Frost <sfrost@snowman.net>, pgsql-general@postgresql.org
> > Sent: Tue, 25 Apr 2006 11:08:09 -0400
> > Subject: Re: [GENERAL] pg_dumpall: does not exist database
> >
> >> On Apr 25, 2006, at 10:51 AM, Tom Lane wrote:
> >>
> >>> Ari Kahn <akahn1@gmu.edu> writes:
> >>>> You'll notice the database foodmart has a carriage return or new
> >>>> line. I still can't figure out how to get rid of it though.
> >>>
> >>> Perhaps something along the lines of
> >>>
> >>>     drop database "foodmart
> >>>     ";
> >>>
> >>>             regards, tom lane
> >>
> >> I tried that. Doesn't work.
> >> Using "od -a" I did determine that there is a CR (carriage return) in
> >> the name.
> >>
> >> 0001240   sp  sp  sp   |  sp  nl  sp   f   o   o   d   m   a   r
> >> t  cr
> >>
> >> ---------------------------(end of
> >> broadcast)---------------------------
> >> TIP 2: Don't 'kill -9' the postmaster
> > ------- End of Original Message -------
> >
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings
------- End of Original Message -------


В списке pgsql-general по дате отправления:

Предыдущее
От: Bill Moseley
Дата:
Сообщение: Anyone install 8.1 on Debian Stable?
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: Database Selection