Welcome Guest, Not a member yet? Register   Sign In
organization of crud for postgrsql
#2

(This post was last modified: 05-29-2020, 10:45 AM by richb201.)

OK. I have created a table in AWS RDS postgres and I have modified my database.php. Here is the setup in database.php for the postgres:
$db['postgres'] = array(
    'dsn' => '',
    'hostname' => 'postgresql://imagesdatabase.cwymdn16cxes.us-east-1.rds.amazonaws.com',
    'username' => 'richb201',
    'password' => 'xxx',
    'database' => 'images',
    'dbdriver' => 'postgre',  //ok
    'dbprefix' => '',
    'pconnect' => FALSE,
    'db_debug' => (ENVIRONMENT !== 'production'),
    'cache_on' => FALSE,
    'cachedir' => '',
    'char_set' => 'utf8',
    'dbcollat' => 'utf8_general_ci',
    'swap_pre' => '',
    'encrypt' => FALSE,
    'compress' => FALSE,
    'stricton' => FALSE,
    'failover' => array(),
    'save_queries' => TRUE,
    'port'    =>5432
);

Before I break out the champagne Smile, how can I test that I can connect to the RDS postgres from CI? I also have a local mySQL dbase which is the default ( $dn['default']= array(...) When I $this->load->database(), I don't get an error. Does this mean my connection to postgres worked? I am using Jaspersoft Studio and with it I can connect to the RDS Postgres fine as the "test link" in Jaspersoft Studio shows.

I modified the dsn to be: dbc:postgresql://imagesdatabase.cwymdn16cxes.us-east-1.rds.amazonaws.com:5432/postgres as per the note in the CI manual.
proof that an old dog can learn new tricks
Reply


Messages In This Thread
organization of crud for postgrsql - by richb201 - 05-26-2020, 12:17 PM
RE: organization of crud for postgrsql - by richb201 - 05-29-2020, 05:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB