From: Rod Taylor <rbt@rbt.ca>
To: scott.marlowe <scott.marlowe@ihs.com>
Cc: Chad N. Tindel <chad@tindel.net>
Cc: Josh Berkus <josh@agliodbs.com>
Cc: PostgreSQL Docs <pgsql-docs@postgresql.org>
Subject: Re: Mysql -> Postgresql pitfalls
Date: Mon, 04 Aug 2003 17:01:29 -0400
Message-ID: <1060030888.91190.22.camel@jester> (raw)
In-Reply-To: <Pine.LNX.4.33.0308041323060.10821-100000@css120.ihs.com>
References: <Pine.LNX.4.33.0308041323060.10821-100000@css120.ihs.com>
> speak in the \copy command. I.e. you wouldn't use inserts to load your
> data, you'd use a bulk copy, which bypassess all the serial / IDENTITY
> stuff. Basically, with the IDENTITY type, if you try to insert a value,
COPY enforces everything that insert does. It's simply a little quicker
than insert due to a different string parsing method and avoiding places
that are for advanced features (subselects, functions, etc.).
A default is still applied if the column has not been provided.
Likewise, triggers (constraint triggers anyway) still run.
Bumping the start value for an IDENTITY is simple:
CREATE TABLE tab (
col integer GENERATED ALWAYS AS IDENTITY(START WITH 42)
);
I suppose we'll need a GUC so that GENERATED ALWAYS isn't actually
always -- just usually.
Attachments:
signature.asc (application/pgp-signature, 186B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: rbt@rbt.ca, scott.marlowe@ihs.com, chad@tindel.net, josh@agliodbs.com
Subject: Re: Mysql -> Postgresql pitfalls
In-Reply-To: <1060030888.91190.22.camel@jester>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox