Обсуждение: Database recovery
Hi In the doc I have "this section needs to be written" I have a database system to recover any pointers greatly appreciated. My tape backup is two weeks old... I know that is badbut I have to live with it. Cheers Tony Grant -- tony@animaproductions.com JWebMail WebMail/Java v0.7.6 WWW to Mail Gateway
tony <tony@animaproductions.com> writes: > Hi > > In the doc I have "this section needs to be written" > > I have a database system to recover any pointers greatly > appreciated. My tape backup is two weeks old... I know that is bad > but I have to live with it. Is it a backup of a dump file produced with pg_dump, or a backup of the raw database files? What have you tried so far? -Doug -- Let us cross over the river, and rest under the shade of the trees. --T. J. Jackson, 1863
Merry Christmas and hello everybody I have a test table with a field called 'name' which have three entries: Johanna Karl Uwe If I query this table with - select name from test where name like 'Uwe'; - select name from test where name like 'U_e'; - select name from test where name like '%e'; or - select name from test where name like '---'; in all cases pg responds with 0 rows found. I was expecting another result;-( Does anybody have a hint or an explanation for this behaviour? My system is RedHat 7.1 with PostgreSQL 7.1.3 Many thanks Conni
Cornelia Boenigk wrote:
> Merry Christmas and hello everybody
>
And to you!
> I have a test table with a field called 'name' which have three
> entries:
> Johanna
> Karl
> Uwe
>
> If I query this table with
> - select name from test where name like 'Uwe';
> - select name from test where name like 'U_e';
> - select name from test where name like '%e';
> or
> - select name from test where name like '---';
>
> in all cases pg responds with 0 rows found.
>
> I was expecting another result;-(
> Does anybody have a hint or an explanation for this behaviour?
> My system is RedHat 7.1 with PostgreSQL 7.1.3
>
You haven't shown us how your "test" table is defined, but if "name" is
a CHAR() field, you need to allow for the spaces padded to the end of
'Ewe'. With TEXT or VARCHAR you don't need to worry about that. See the
examples below:
test=# create table test1(name text);
CREATE
test=# create table test2(name char(25));
CREATE
test=# create table test3(name varchar(25));
CREATE
test=# insert into test1 values('Uwe');
INSERT 1492521 1
test=# insert into test2 values('Uwe');
INSERT 1492522 1
test=# insert into test3 values('Uwe');
INSERT 1492523 1
test=# select name from test1 where name like 'Uwe';
name
------
Uwe
(1 row)
test=# select name from test1 where name like 'U_e';
name
------
Uwe
(1 row)
test=# select name from test1 where name like '%e';
name
------
Uwe
(1 row)
test=# select name from test2 where name like 'Uwe';
name
------
(0 rows)
test=# select name from test2 where name like 'Uwe%';
name
---------------------------
Uwe
(1 row)
test=# select name from test2 where name like 'U_e';
name
------
(0 rows)
test=# select name from test2 where name like 'U_e%';
name
---------------------------
Uwe
(1 row)
test=# select name from test2 where name like '%e';
name
------
(0 rows)
test=# select name from test2 where name like '%e%';
name
---------------------------
Uwe
(1 row)
test=# select name from test3 where name like 'Uwe';
name
------
Uwe
(1 row)
test=# select name from test3 where name like 'U_e';
name
------
Uwe
(1 row)
test=# select name from test3 where name like '%e';
name
------
Uwe
(1 row)
test=# select version();
version
-------------------------------------------------------------
PostgreSQL 7.2b3 on i686-pc-linux-gnu, compiled by GCC 2.96
(1 row)
Hope this helps,
Joe
You wrote: > tony <tony@animaproductions.com> writes: > > Hi > > > > In the doc I have "this section needs to be written" > > > > I have a database system to recover any pointers greatly > > appreciated. My tape backup is two weeks old... I know that is bad > > but I have to live with it. > Is it a backup of a dump file produced with pg_dump, or a backup of > the raw database files? Raw database > What have you tried so far? Nothing yet too scared to break it more. I'll check the developpement docs now. Cheers Tony -- tony@animaproductions.com JWebMail WebMail/Java v0.7.6 WWW to Mail Gatewayy
You wrote: > > In the doc I have "this section needs to be written" > Check the new development docs. There is some content now. > > I have a database system to recover any pointers greatly appreciated. My tape > >backup is two weeks old... I know that i s bad but I have to live with it. > You will need to give some hints on what the symptoms are. Hardware failure. postmaster refuses to start. I don't know if anybody was writing to the database at the time. cheers tony -- tony@animaproductions.com JWebMail WebMail/Java v0.7.6 WWW to Mail Gatewaya
Hi Joe > but if "name" is > a CHAR() field, you need to allow for the spaces padded to the end This was exactly the problem. Thank you Conni