Re: [GENERAL] Some MySQL features - Mailing list pgsql-general

From Herbert Liechti
Subject Re: [GENERAL] Some MySQL features
Date
Msg-id 3847CD82.9B84062E@thinx.ch
Whole thread Raw
In response to Some MySQL features  ("vincent leycuras" <lv68@hotmail.com>)
Responses Re: [GENERAL] Some MySQL features  ("Ross J. Reedstrom" <reedstrm@wallace.ece.rice.edu>)
List pgsql-general
vincent leycuras wrote:

> I'd like to know if pgsql supports the two excellent features that exist in
> MySQL:
> - the possibility to load the database with ASCII formatted file containing
> the data we want to put;

Sure. This is the copy routine. But it is also easy to load data with
programs (perl DBI/DBD)

> - the index auto incrementation the prevents from having to specify the
> value of the primary key each time one adds a row.

Sure. You may define a sequence by doing this:

create sequence xxx_id_seq START 1;
create table xxy
(
   xxx_Id                    INTEGER       NOT NULL
         DEFAULT NEXTVAL('xxx_id_seq'),
   ...
);


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Herbert Liechti                     E-Mail: Herbert.Liechti@thinx.ch
ThinX networked business services        Stahlrain 10, CH-5200 Brugg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pgsql-general by date:

Previous
From: "vincent leycuras"
Date:
Subject: Some MySQL features
Next
From: "V Krishnaraj"
Date:
Subject: Urgent - unable to get postgres up