Thread: Another mySQL to PostgreSQL move question

Another mySQL to PostgreSQL move question

From
Matt Housh
Date:
    Does PostgreSQL support something like mySQL's auto_increment tag? For
example, my entering "create table test (userid int default 0 not null
auto_increment);" in mySQL creates a table with one field that automatically
increments its value if none is specified. I have not been able to duplicate
this in PostgreSQL yet (still new...) - any help is appreciated...

Matt

Re: Another mySQL to PostgreSQL move question

From
Ed Loehr
Date:
Matt Housh wrote:
>
>         Does PostgreSQL support something like mySQL's auto_increment tag?

See question 4.16.1 of

    http://www.postgresql.org/docs/faq-english.html

Regards,
Ed Loehr

Re: Another mySQL to PostgreSQL move question

From
Matt Housh
Date:
> See question 4.16.1 of
>
>         http://www.postgresql.org/docs/faq-english.html
>
> Regards,
> Ed Loehr

    Once again, thanks Ed :) That's exactly what I needed. :)

Matt

Re: Another mySQL to PostgreSQL move question

From
Giulio Orsero
Date:
On Mon, 10 Jul 2000 13:55:24 -0500, you wrote:

>>         Does PostgreSQL support something like mySQL's auto_increment tag?
>See question 4.16.1 of
>    http://www.postgresql.org/docs/faq-english.html

I've never used MySQL, and I'm new to PostgreSQL, can you explain me
what does the following mean?

[ From the PHPBuilder MySQl/PostgreSQL report:
http://www.phpbuilder.com/columns/tim20000705.php3 ]

".. MySQL is "smart" enough to increment its auto_increment value when
you import data, whereas Postgres' sequence does not get reset when you
import data, causing all new inserts to fail..."

Does it refer to when you import data with COPY (MySQL's LOAD DATA)?
What actually happens to the sequence when you use COPY?

Thanks.

--
giulioo@pobox.com