[wp-hackers] PostgreSQL port status?

usleepless at gmail.com usleepless at gmail.com
Fri Sep 28 14:58:51 GMT 2007


On 9/28/07, Tom Barta <tbarta at gmail.com> wrote:
> > is there anyone who can explain why there are about 6 integer types in
> > the schema?
> >  - bigint(10)
> >  - bigint(20)
> >  - tinyint(1)
> >  - int(11)
> >  - int(4)
> >  - unsigned
>
> BIGINT may be necessary to support larger sequences/auto-increments,
> and TINYINT(1) IIRC is a boolean flag.  Other than that, it's another
> baby step towards MySQL lock-in (^:

this can be solved easily by replacing all occurences in schema.php
with a $-version like:
"
CREATE TABLE crap (
id int not null auto_increment,
comment_karma $mediumint,
comment_text     $longtext,
...
)
"

for mysql :
  $mediumint = 'mediumint';
  $longtext = 'longtext';

and for pgsql:
 $mediumint = 'int';
 $longtext = 'text';

and for mssql:
  $  yadayadayada...


anyways, i have my mysql2pgsql.php module attached.

regards,

usleep


More information about the wp-hackers mailing list