Help Center Live Community
April 16, 2014, 05:20:28 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Using postgres  (Read 3679 times)
BrianP
Not too much to say...
*
Offline Offline

Posts: 30


« 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

Logged
simpleautosports.com
Not too much to say...
*
Offline Offline

Posts: 7


WWW
« Reply #1 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


Logged

Visit my site and make an offer for the best price on auto  and truck parts! www. simpleautosports. com
BrianP
Not too much to say...
*
Offline Offline

Posts: 30


« Reply #2 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
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.175 seconds with 18 queries.

Google visited last this page March 18, 2014, 02:57:40 PM