Comments on: Tips for MySQL to PostgreSQL Switch http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/ Sat, 14 Mar 2015 18:35:20 +0000 http://wordpress.org/?v=2.8.4 hourly 1 By: referrer http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15351 referrer Fri, 27 Feb 2015 22:50:20 +0000 http://codespatter.com/?p=38#comment-15351 <strong>referrer...</strong> Tips for MySQL to PostgreSQL Switch | Code Spatter... referrer…

Tips for MySQL to PostgreSQL Switch | Code Spatter…

]]>
By: Tackk.com http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15350 Tackk.com Fri, 27 Feb 2015 13:10:43 +0000 http://codespatter.com/?p=38#comment-15350 <strong>Tackk.com...</strong> Tips for MySQL to PostgreSQL Switch | Code Spatter... Tackk.com…

Tips for MySQL to PostgreSQL Switch | Code Spatter…

]]>
By: ケア用品 衛生用品 http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15321 ケア用品 衛生用品 Sun, 21 Sep 2014 02:37:58 +0000 http://codespatter.com/?p=38#comment-15321 <strong>ケア用品 衛生用品...</strong> Tips for MySQL to PostgreSQL Switch | Code Spatter... ケア用品 衛生用品…

Tips for MySQL to PostgreSQL Switch | Code Spatter…

]]>
By: fsgb80v7cbwe http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15277 fsgb80v7cbwe Sat, 22 Dec 2012 03:57:56 +0000 http://codespatter.com/?p=38#comment-15277 <strong>So cool...</strong> The information mentioned in the article are some of the best available... So cool…

The information mentioned in the article are some of the best available…

]]>
By: 0hna.tk http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15276 0hna.tk Sun, 30 Sep 2012 07:52:38 +0000 http://codespatter.com/?p=38#comment-15276 <strong>0hna.tk...</strong> Tips for MySQL to PostgreSQL Switch | Code Spatter... 0hna.tk…

Tips for MySQL to PostgreSQL Switch | Code Spatter…

]]>
By: Gamerii http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15274 Gamerii Sat, 30 Jun 2012 08:54:06 +0000 http://codespatter.com/?p=38#comment-15274 I like this web blog very much, Its a rattling nice situation to read and incur information. <a href="http://gamer1000" rel="nofollow">http://gamer1000</a>Fun dress up games yo3pgm <a href="http://gamer1000" rel="nofollow">http://gamer1000</a> dress up games %twqzi I like this web blog very much, Its a rattling nice situation to read and incur information.

http://gamer1000Fun dress up games
yo3pgm
http://gamer1000 dress up games
%twqzi

]]>
By: Greg Allard http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15281 Greg Allard Tue, 30 Sep 2008 20:05:35 +0000 http://codespatter.com/?p=38#comment-15281 <p>If that query isn't working, try moving the +1 out of the select statement like this:</p> <p>ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) FROM univers)+1;</p> If that query isn't working, try moving the +1 out of the select statement like this:

ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) FROM univers)+1;

]]>
By: Greg Allard http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15083 Greg Allard Tue, 30 Sep 2008 16:05:35 +0000 http://codespatter.com/?p=38#comment-15083 If that query isn't working, try moving the +1 out of the select statement like this:<br><br>ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) FROM univers)+1; If that query isn't working, try moving the +1 out of the select statement like this:

ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) FROM univers)+1;

]]>
By: Emilien http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-15082 Emilien Sun, 28 Sep 2008 10:26:35 +0000 http://codespatter.com/?p=38#comment-15082 Hello,<br>do you know how to do something like this ?<br><br>ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) + 1 FROM univers);<br><br>Thanks<br>Emilien Hello,
do you know how to do something like this ?

ALTER SEQUENCE univers_id_seq RESTART WITH (SELECT max(id) + 1 FROM univers);

Thanks
Emilien

]]>
By: Greg Allard http://codespatter.com/2008/07/02/tips-for-mysql-to-postgresql-switch/comment-page-1/#comment-13338 Greg Allard Fri, 11 Jul 2008 14:56:23 +0000 http://codespatter.com/?p=38#comment-13338 I noticed another case I may have missed, so I edited the post to catch when the key may be a smallint.<br><br>Try running these 4 queries. <br><br><br>CREATE TABLE manila_area_tbl<br>(<br>area_no SERIAL,<br>area_name varchar(65) NOT NULL,<br>disp_flag char(1) NOT NULL default 1,<br>disp_no smallint NOT NULL,<br>del_flag char(1) NOT NULL default 0,<br>PRIMARY KEY (area_no)<br>) ;<br><br>CREATE INDEX disp_no ON manila_area_tbl (disp_no);<br><br>CREATE INDEX del_flag ON manila_area_tbl (del_flag);<br><br>ALTER SEQUENCE manila_area_tbl_area_no_seq RESTART WITH 25; I noticed another case I may have missed, so I edited the post to catch when the key may be a smallint.

Try running these 4 queries.

CREATE TABLE manila_area_tbl
(
area_no SERIAL,
area_name varchar(65) NOT NULL,
disp_flag char(1) NOT NULL default 1,
disp_no smallint NOT NULL,
del_flag char(1) NOT NULL default 0,
PRIMARY KEY (area_no)
) ;

CREATE INDEX disp_no ON manila_area_tbl (disp_no);

CREATE INDEX del_flag ON manila_area_tbl (del_flag);

ALTER SEQUENCE manila_area_tbl_area_no_seq RESTART WITH 25;

]]>