Re: [GENERAL] TESTING the DATABASE

Поиск
Список
Период
Сортировка
От Nigel J. Andrews
Тема Re: [GENERAL] TESTING the DATABASE
Дата
Msg-id Pine.LNX.4.21.0305150853540.12078-100000@ponder.fairway2k.co.uk
обсуждение исходный текст
Ответ на Re: [GENERAL] TESTING the DATABASE  (Himmet Karaman <karamanhi@itu.edu.tr>)
Список pgsql-admin

On Thu, 15 May 2003, Himmet Karaman wrote:

> Hi,
> I want to test all part of the database.
> If the relations work, and all of the tables are ok, and can i make
> queries on my database...
> i mean can my database do everything wright?
> Is there any tool or command to test it?
> Thanks again

Well that's the problem, only you can say what is right when testing your
database. You can easily write a script to construct a script which will issue
queries against all your tables individually , but then you're querying the
database in order to get that list of tables. With more effort you could write
a script to determine all the foriegn keys and construct many queries to
test the joining of tables based on this information, but again you'll be
querying the database in order to get that information in the first place.

In short, I don't believe there can be a tool that does what you want. If just
checking referential integrity and queriability (I don't think that is a word
btw) is what you want then it is possible to do it if you feel you can rely on
the system tables working as they should.

Having said that. Take a look in the source at src/test/regress/... as that
could provide you with a useful framework for you to incorporate the knowledge
of correctness that an automatic tool can not provide.


--
Nigel J. Andrews


>
> Nigel J. Andrews wrote:
>
> >On Thu, 15 May 2003, Himmet Karaman wrote:
> >
> >
> >
> >>Hello to all,
> >>Is there anyone who can explain me briefly, how can I test the database
> >>that I created using PostgreSQL?
> >>Thanks a lot for the time you spent ...
> >>
> >>
> >
> >
> >Well, at a basic level...
> >
> >$ psql mydbname
> >Welcome to psql 7.3.2, the PostgreSQL interactive terminal.
> >
> >Type:  \copyright for distribution terms
> >       \h for help with SQL commands
> >       \? for help on internal slash commands
> >       \g or terminate with semicolon to execute query
> >       \q to quit
> >
> >mydbname=> create table mytable ( a integer );
> >mydbname=> insert into mytable (a) values (1);
> >mydbname=> select * from mytable;
> > a
> >---
> > 1
> >(1 row)
> >
> >mydbname=>\q
> >
> >
> >The question is, what is it you want to test?
> >
> >
> >
> >
>
>




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

Предыдущее
От: Ericson Smith
Дата:
Сообщение: Trying to profile my function, but...
Следующее
От: "Nigel J. Andrews"
Дата:
Сообщение: Re: [GENERAL] TESTING the DATABASE