Part of the EllisLab Network
   
 
bug in postgre driver
Posted: 03 February 2007 05:38 AM   [ Ignore ]  
Summer Student
Avatar
Total Posts:  12
Joined  03-13-2006

replace

$v = pg_version($this->conn_id);


with

$v = $this->version($this->conn_id);

Profile
 
 
Posted: 03 February 2007 09:08 AM   [ Ignore ]   [ # 1 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  886
Joined  03-06-2006

I don’t use PostgreSQL, so I don’t have a good way to test it, but from looking at the code, that DOES seem to be a bug, and your correction looks like it would work.

Good catch!

 Signature 

Corozal, Belize | Linux.bz | Using Kubuntu Linux 7.10 | CodeIgniter 1.5.3

Profile
 
 
Posted: 06 February 2007 09:28 PM   [ Ignore ]   [ # 2 ]  
Summer Student
Avatar
Total Posts:  12
Joined  03-13-2006

PostgreSQL in CI seems a little bit unsuported, less functions etc. :(

Profile
 
 
Posted: 06 February 2007 10:53 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6762
Joined  03-23-2006

I agree it looks helpful.  Could you outline for me what the original code does that’s wrong, and how the revised code will fix it?  I’d need this information to affect any change in the codebase.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
Posted: 07 February 2007 12:01 PM   [ Ignore ]   [ # 4 ]  
Summer Student
Avatar
Total Posts:  12
Joined  03-13-2006

pg_version() function don’t exists in postgresql driver, but exist $this->version()

Profile
 
 
Posted: 06 March 2007 12:15 PM   [ Ignore ]   [ # 5 ]  
Grad Student
Avatar
Rank
Total Posts:  36
Joined  03-02-2007

It seems postgresql isn’t fully supported, i have an old server running : “PostgreSQL 7.2.1 on sparc-sun-solaris2.8, compiled by GCC 3.0.4”
I set up config like this :

$db['default']['hostname'] = "myhost";
$db['default']['username'] = "myname";
$db['default']['password'] = "";
$db['default']['database'] = "mydb";
$db['default']['dbdriver'] = "postgre";
$db['default']['dbprefix'] = "";
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";

And i can’t see my view, if i load database ($this->load->database();), i get no error, no text just a blank page…
And no, i can’t change the DB

It seems that my database have an “ODBC driver” named Postgresql (v 7.3.100) but i tried it too and get an error “can’t access database ...”

Profile
 
 
Posted: 07 March 2007 03:17 AM   [ Ignore ]   [ # 6 ]  
Grad Student
Avatar
Rank
Total Posts:  36
Joined  03-02-2007

Ok this has been fixed since i’m developping on a local webserver that hadn’t psql support activated in php.ini

>>> “Ah Ah”®Nelson

Profile
 
 
Posted: 07 March 2007 07:13 AM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
RankRankRankRankRankRank
Total Posts:  6762
Joined  03-23-2006

The version() vs pg_version() item has been fixed in the svn, but I don’t believe any other changes to the postgres driver has been made.

 Signature 

DerekAllard.com - CodeIgniter, ExpressionEngine, and the World of Web Design
BambooInvoice - Open Source, CodeIgniter powered invoicing.

Profile
MSG
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 66413 Total Logged-in Users: 25
Total Topics: 84753 Total Anonymous Users: 1
Total Replies: 454821 Total Guests: 234
Total Posts: 539574    
Members ( View Memberlist )
Newest Members:  byrooNirCalexmuellerkizerdrixcaptainredmuffquinodligtharttechsivamDjordjesammozza