disappearing tables

Поиск
Список
Период
Сортировка
Искать

disappearing tables

От:
"paul butler" <paul@entropia.co.uk>
Дата:
Dear List
I've just pg_dumped a database (data and description  from version 
7.13 and loaded into a blank local database ( I'm using cygwin , 
pg7.2) using psql  \i. I've got php pages accessing it and everything 
is sweet, however in psql I can't view some of the tables, after a 
select I get is:
less: not found
\d shows all the tables are there and vacuum shows  the data is 
also. I've stopped and restarted but to no avail
Also when I try to drop and create under the same name, I get the 
original dbase back. eg
Drop database wage;
Create database wage;
Returns the dropped database, not a blank one.
What am I doing wrong?
TIA
Paul Butler

Re: disappearing tables

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
"paul butler"  writes:
> I've just pg_dumped a database (data and description  from version 
> 7.13 and loaded into a blank local database ( I'm using cygwin , 
> pg7.2) using psql  \i. I've got php pages accessing it and everything 
> is sweet, however in psql I can't view some of the tables, after a 
> select I get is:
> less: not found

You evidently don't have the "less" program installed.  If you have
"more", try setting PAGER in psql's environment to "more".  Else turn
off the output-pager function with \pset.  See the psql man page for
more details.

> Also when I try to drop and create under the same name, I get the 
> original dbase back. eg
> Drop database wage;
> Create database wage;
> Returns the dropped database, not a blank one.

Sounds to me like you imported everything into template1.  That was a
bad idea.  You can recover from this, see
http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php
but if you don't have anything critical stored yet it might be easier
to initdb and start over.

			regards, tom lane

Re: disappearing tables

От:
"paul butler" <paul@entropia.co.uk>
Дата:
Turning off pset worked a treat, thanks. I'll figure out less and more 
when I have the chance

> "paul butler"  writes:
> > I've just pg_dumped a database (data and description  from 
version 
> > 7.13 and loaded into a blank local database ( I'm using cygwin 
, 
> > pg7.2) using psql  \i. I've got php pages accessing it and 
everything 
> > is sweet, however in psql I can't view some of the tables, after 
a 
> > select I get is:
> > less: not found
> 
> You evidently don't have the "less" program installed.  If you have
> "more", try setting PAGER in psql's environment to "more".  Else 
turn
> off the output-pager function with \pset.  See the psql man page 
for
> more details.
> 
> > Also when I try to drop and create under the same name, I get 
the 
> > original dbase back. eg
> > Drop database wage;
> > Create database wage;
> > Returns the dropped database, not a blank one.
> 
> Sounds to me like you imported everything into template1.  That 
was a
> bad idea.  You can recover from this, see
> http://techdocs.postgresql.org/techdocs/pgsqladventuresep1.php
> but if you don't have anything critical stored yet it might be easier
> to initdb and start over.
> 
> 			regards, tom lane
FAQ