creating a dumpfile from a view

Поиск
Список
Период
Сортировка
От Richard Yen
Тема creating a dumpfile from a view
Дата
Msg-id 8207AD00-372F-411F-BE78-C984D9C8883C@richyen.com
обсуждение исходный текст
Ответы Re: creating a dumpfile from a view  ("Taras Kopets" <tkopets@gmail.com>)
Re: creating a dumpfile from a view  (Reece Hart <reece@harts.net>)
Список pgsql-general
Hi, I'm trying to create a dumpfile for a client.  The data is
gathered from about 7 tables, and I need to output all the columns as
the client wishes.

I figure the best way to this is to collect data from multiple tables
and putting them into a view, and using the client's desired names to
be the column headings of this view.  Then, I'd dump the data from a
view, and it'll all be ready for delivery.

The problem I run into is that when I dump from a view, I just get
the query that defined it in the first place.

pg_dump --table=demtest dbname

Output:
--
-- PostgreSQL database dump
--

SET client_encoding = 'SQL_ASCII';
SET check_function_bodies = false;
SET client_min_messages = warning;

SET search_path = amt, pg_catalog;

--
-- Name: demtest; Type: VIEW; Schema: amt; Owner: postgres
--

CREATE VIEW demtest AS
     SELECT foo.serial_no, foo.course_id, foo.writer_id,
foo.assignment_type, bar.critique_serial_no, ...;


ALTER TABLE amt.demtest OWNER TO postgres;

--
-- PostgreSQL database dump complete
--



Would anyone know how to dump the data from the view?  I tried the
following, but it doesn't work:

Thanks!
--Richard

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

Предыдущее
От: "J B"
Дата:
Сообщение: Re: Stripping empty space from all fields in a table?
Следующее
От: Stephan Szabo
Дата:
Сообщение: Re: Deleting Problem