pg_timestamp ia an optional tool to skip parsing overhead of timestamp string. This is involved in a pg_bulkload package.
This user-defined function provides very fast loading of timestamp type data. For the speed, instead, the format of the timestamp data must satisfy the following 19byte format:
2007-01-01 12:34:56
Installation sequence is shown below. As a preliminary, the permissions of directories of PostgreSQL server should be set correctly.
$ cd [directory where postgresql-8.2or3.X.tar.gz is untared]/contrib/
$ tar zxvf pg_bulkload-2.3.X.tar.gz
$ cd pg_bulkload
$ make
$ make install
$ postgresql start
$ psql -f $PGHOME/share/contrib/pg_timestamp.sql database_name
Timestamp value with timezone attribute is outside the scope of pg_timestamp_in.
If you provide data in such format, you must use usual
PostgreSQL feature to read data. In this case, you may need longer duration
to load. Although pg_timestamp_in provide much faster data loading for
timestamp data, it replaces usual PostgreSQL's internal function used to read
timestamp data. That is, use of pg_timestamp_in influences the data symtax
for PostgreSQL's SQL statements such as INSERT
, COPY
, and UPDATE
. To avoid
such influence, users have to use pg_timestamp_in only in the data loading,
and uninstall pg_timestamp_in.