Re: Moving from MySQL to PGSQL....some questions (multilevel

Поиск
Список
Период
Сортировка
От Paulovič Michal
Тема Re: Moving from MySQL to PGSQL....some questions (multilevel
Дата
Msg-id 4044DDEF.1050402@paulovic.sk
обсуждение исходный текст
Ответ на Re: Moving from MySQL to PGSQL....some questions  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Moving from MySQL to PGSQL....some questions (multilevel  ("scott.marlowe" <scott.marlowe@ihs.com>)
Список pgsql-general
how you solve the problem with multilevel autoicrement?

In MySQL you create table with col1, col2. Col 2 is AUTOICREMENT and you
have to create UNIQUE INDEX (Col1, Col2). If you insert to this table
for col1 volume 1, col2 automaticaly increase by one.

Example:
Insert into table values (1);
Insert into table values (1);
Insert into table values (2);
Insert into table values (1);
Insert into table values (2);

Result is:
1,1
1,2
2,1
1,3
2,2

How you convert this functionality from MySQL to PgSQL???


--------------------------------------
Bruce Momjian wrote:

>Michael Chaney wrote:
>
>
>>One other note, for those converting a database from MySQL to
>>PostgreSQL, I have a table creation conversion script here:
>>
>>http://www.michaelchaney.com/downloads/m2p.pl
>>
>>I know that two come with PostgreSQL in the contrib directory, but I
>>wrote this because those two didn't do what I needed.  With this, you
>>should be able to take the MySQL table creation scripts (as created by
>>mysqldump --tab=x) and directly build the tables and load the data into
>>a PostgreSQL db with little effort.
>>
>>
>
>Please share what yours does that the /contrib doesn't, and ideally,
>send in a patch or let us add your version to /contrib.
>
>
>


В списке pgsql-general по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Moving from MySQL to PGSQL....some questions
Следующее
От: Paulovič Michal
Дата:
Сообщение: Re: max table size