[OPEN-ILS-DEV] cstore problem

Dan Scott denials at gmail.com
Tue May 15 11:51:16 EDT 2007


Yep, that works too. Perhaps the best option would be to use the
information_schema:

SELECT table_schema, table_name
FROM information_schema.tables
WHERE table_schema not in ('information_schema', 'pg_catalog', 'public')
ORDER BY table_schema, table_name;

Stuff that into a simple Perl script that reads in the appropriate
settings from opensrf.xml, and you get the benefits of confirming your
DBI, DBD::Pg, database connection, and schema all at once.

On 15/05/07, Bill Ott <bott at grpl.org> wrote:
> \dt *.*
>
> This will show all schemas and all tables within.
>
>
> Dan Scott said the following on 05/15/2007 07:26 AM:
> > Close, but \dt won't work for these purposes.
> >
> > \dn is what you want to use to display all of the schemas, and you
> > should see something like this:
> >
> >
> >        List of schemas
> >        Name        |  Owner
> > --------------------+----------
> > action             | postgres
> > actor              | postgres
> > asset              | postgres
> > auditor            | postgres
> > authority          | postgres
> > biblio             | postgres
> > config             | postgres
> > container          | postgres
> > information_schema | postgres
> > metabib            | postgres
> > money              | postgres
> > offline            | postgres
> > permission         | postgres
> > pg_catalog         | postgres
> > pg_toast           | postgres
> > public             | postgres
> > reporter           | postgres
> > stats              | postgres
> > (18 rows)
> >
> > Dan
> >
> > On 15/05/07, Don Hamilton <dhamilton at wlu.ca> wrote:
> >>
> >>
> >> Hi again... sorry about not responding to the list, Don... Me bad,
> >> again!..
> >>
> >> Anyway, \dt also only shows the 4 tables that hennie reported.
> >> I did find ~/Evergreen/Open-ILS/src/sql/Pg/build-db.sh, and
> >> ran it, entering the password several times, and watching output that
> >> looked
> >> like it was working... but still no tables show with a \dt.
> >>
> >> don
> >>
> >> >>> don.mcmorris at gmail.com 5/15/2007 2:15 AM >>>
> >>
> >> My bad guys! \z is privileges.  Instead, run \dt.  According to the
> >> manual, this should show the tables.
> >>
> >> --Don
> >>
> >> On 5/15/07, Hennie Rautenbach <hennie at sabinet.co.za> wrote:
> >> > Don McMorris wrote:
> >> > > First, I want to make sure the PostgreSQL server is functioning
> >> right
> >> > > and that the evergreen database is populated properly.  To do this:
> >> > > root# su postgres -c "psql -h tamarak -p 5432 -U evergreen
> >> evergreen"
> >> > > evergreen> \z
> >> > > evergreen> \q
> >> > > root#
> >> > Thought I'd do the same:
> >> >
> >> > opensrf at leo:~$ psql -h leo.sabinet.co.za -p 5432 -U postgres evergreen
> >> > Password for user postgres:
> >> > Welcome to psql 8.1.8, the PostgreSQL interactive terminal.
> >> >
> >> > Type:  \copyright for distribution terms
> >> >        \h for help with SQL commands
> >> >        \? for help with psql commands
> >> >        \g or terminate with semicolon to execute query
> >> >        \q to quit
> >> >
> >> > SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
> >> >
> >> > evergreen=# \z
> >> >     Access privileges for database "evergreen"
> >> >  Schema |     Name     | Type  | Access privileges
> >> > --------+--------------+-------+-------------------
> >> >  public | pg_ts_cfg    | table |
> >> >  public | pg_ts_cfgmap | table |
> >> >  public | pg_ts_dict   | table |
> >> >  public | pg_ts_parser | table |
> >> > (4 rows)
> >> >
> >> > evergreen=# \q
> >> > opensrf at leo:~$
> >> >
> >> > Hennie
> >> >
> >> >
> >> >
> >> --------------------------------------------------------------------------------
> >>
> >> >
> >> > This transmission is for the intended addressee only and is
> >> confidential
> >> > information. If you have received this transmission in error, please
> >> > delete it and notify the sender. The contents of this e-mail are the
> >> > opinion of the writer only and are not endorsed by Sabinet Online
> >> > Limited unless expressly stated otherwise.
> >> >
> >> --------------------------------------------------------------------------------
> >>
> >> >
> >>
> >
> >
>


-- 
Dan Scott
Laurentian University


More information about the Open-ils-dev mailing list