Another mySQL to PostgreSQL move question

Started by Matt Houshalmost 26 years ago4 messagesgeneral
Jump to latest
#1Matt Housh
jaeger@morpheus.net

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

#2Ed Loehr
eloehr@austin.rr.com
In reply to: Matt Housh (#1)
Re: Another mySQL to PostgreSQL move question

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

#3Matt Housh
jaeger@morpheus.net
In reply to: Matt Housh (#1)
Re: Another mySQL to PostgreSQL move question

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

#4Giulio Orsero
giulioo@pobox.com
In reply to: Ed Loehr (#2)
Re: Another mySQL to PostgreSQL move question

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