Help Center Live Community

Support => Installation Help & Software Support => Topic started by: BrianP on March 19, 2009, 08:40:39 PM



Title: Using postgres
Post by: BrianP on March 19, 2009, 08:40:39 PM
So, Ihave setup HCL and my boss really likes it.   But he wants Postgres rather than MySQL.   It sounds like (based on various posts), that Postgres will be supported in V3, but there isn't a release data, just 'soon' for the last few months.   So, I tried to convert 2. 1. 7 to postgres.

I started with using the tool mysqlphp2postgres (hxxp: mp2p. mikekohn. net/) on the file class/database. php (which seems to be the only file that has database commands in it).   It had two issues:

Warning: mysql_select_db() not supported.
--------------------------------------------------------
This shouldn't be a problem because the Postgres connect command includes the DB name, where MySQL doesn't.

hxxp: www. usenet-forums. com/php-language/14873-mysql-postgres-conversion. html
mysql_insert_id: pg_last_oid
mysql_insert_id: For tables without OID use pg_result_status
--------------------------------------------------------
Haven't even look at this one yet, 'tis a runtime thing.

So, then I tried the install.   And it failed.   Mostly because setup/database. sql uses data types and commands that Postgres doesn't know.   So, I changed:
removed the `` around the names
int(255), int(5), and int(1) to integer
tinyint(1) to smallint
char(1) to char
auto_increment to nextval with a defined sequence.

Then I hit a brick wall.   Namely the blob type.   Any idea what the postgres equivalent is?  Or is there going to need to be code changes to make this work (ie blob contains the file name which is loaded from disc seperately)?

- brian



Title: Re: Using postgres
Post by: simpleautosports.com on March 28, 2009, 02:54:21 AM
FWIW  straight from a horses mouth hxxp: www. postgresql. org/files/documentation/books/aw_pgsql/node96. html




Title: Re: Using postgres
Post by: BrianP on April 02, 2009, 03:24:15 PM
From that web page:

Because large objects use the local filesystem, users connecting over a network cannot use lo_import or lo_export().  They can, however, use psql's \lo_import and \lo_export commands.   

I am not sure how to work around this.   I guess I will have to wait until v3 which (I thought I read somewhere) will have plugin support for other DBs. . . . . .

- brian