2009年10月12日星期一

Re: [fw-db] Default schema for Postgresql

Perhaps it could be a driver option? One thing you could do is create
an abstract table class that sets the schema to public or whatever.
Then if you need to change the schema later you just need to change it
in that one file.

Mark

On Mon, Oct 12, 2009 at 9:48 AM, Mark Hage <m.c.hage@gmail.com> wrote:
> Hi,
>
> I'm writing some re-usable modules, which use a postgresql database (through
> pdo).
> Is it possible to set the schema in some parameter, so I don't have to
> change all the DbTable classes when I transport my code?
>
> I tried it in the ini file like:
> resources.db.adapter = PDO_PGSQL
> resources.db.params.host = localhost
> resources.db.params.username = user
> resources.db.params.password = pass
> resources.db.params.dbname = defaultdb
> resources.db.params.schema = myschema
>
> But that doesn't seem to work.
> Should this be possible or are there any other possiblities?
>
> Thanks,
> Mark
>
>

--
Have fun or die trying - but try not to actually die.

没有评论: