Populating a Class with Instances/Postgres Docs

Поиск
Список
Период
Сортировка
Искать

Populating a Class with Instances/Postgres Docs

От:
Georg Vollmers <Vollmers@hdi.de>
Дата:
PostgreSQL User's Guide
PrevChapter 12. The Query LanguageNext

Populating a Class with Instances

The insert statement is used to populate a class with instances:

INSERT INTO weather   VALUES ('San Francisco', 46, 50, 0.25, '11/27/1994')

You can also use the copy command to perform load large amounts of data from flat (ASCII) files. This is usually faster because the data is read (or written) as a single atomic transaction directly to or from the target table. An example would be:

COPY INTO weather FROM '/home/user/weather.txt'   USING DELIMITERS '|';
where the path name for the source file must be available to the backend server machine, not just the client.

PrevHomeNext
Creating a New ClassUpQuerying a Class
FAQ