Thread: Example Database Script

Example Database Script

From
"Christopher Kings-Lynne"
Date:
Hi,

Does anyone have a snippet of postgres SQL that will create a database with
_everything_ that postgres supports?  (ie. types, functions, constraints,
operators, everything...)

I just need it for testing SQL dump code.

If not, then I'll create one myself and post it back here.

Thanks,

Chris

--
Christopher Kings-Lynne
Family Health Network (ACN 089 639 243)



Re: Example Database Script

From
Philip Warner
Date:
At 14:11 28/11/00 +0800, Christopher Kings-Lynne wrote:
>Hi,
>
>Does anyone have a snippet of postgres SQL that will create a database with
>_everything_ that postgres supports?  (ie. types, functions, constraints,
>operators, everything...)

I tend to use my own databases (because the have lots of data), and the
regression database (because it has a lot of PG things). When you find
something missing from the regression DB, you might consider adding it...

Also, bear in mind that pg_dump does not work properly with the regression
DB - something about column order in the CREATE TABLE vs. COPY statements,
but there is only the one error.




----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: Example Database Script

From
Bruce Momjian
Date:
> At 14:11 28/11/00 +0800, Christopher Kings-Lynne wrote:
> >Hi,
> >
> >Does anyone have a snippet of postgres SQL that will create a database with
> >_everything_ that postgres supports?  (ie. types, functions, constraints,
> >operators, everything...)
> 
> I tend to use my own databases (because the have lots of data), and the
> regression database (because it has a lot of PG things). When you find
> something missing from the regression DB, you might consider adding it...
> 
> Also, bear in mind that pg_dump does not work properly with the regression
> DB - something about column order in the CREATE TABLE vs. COPY statements,
> but there is only the one error.

The real test is to run the regression test, dump the database, reload
it into another db, do a dump of that db, and compare the original
regression dump with that one.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026