Thread: DBD::Pg, schema support
Hi there, is't possible to specify default search path for dbh in DBD::Pg ? I don't want to set variable before every select. Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > is't possible to specify default search path for dbh in DBD::Pg ? > I don't want to set variable before every select. There is nothing specific to DBD::Pg, but you should be able to issue the command once ("SET search_path...") and have all subsequent requests on the same database handle use that schema. - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200307231328 -----BEGIN PGP SIGNATURE----- Comment: http://www.turnstep.com/pgp.html iD8DBQE/HsXXvJuQZxSWSsgRArfEAJ4+mIE7fTXnvf3JHS2Y3WmSoZwO/QCgxpx0 RuTjTUI3hngy2T9BMqDEXpE= =tvul -----END PGP SIGNATURE-----
Can you give an example on how to execute that command? I've been wondering about that too but haven't had time to read the documentation. Richard On 2003.07.23 10:30 greg@turnstep.com wrote: > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > is't possible to specify default search path for dbh in DBD::Pg ? > > I don't want to set variable before every select. > > There is nothing specific to DBD::Pg, but you should be able to issue > the command once ("SET search_path...") and have all subsequent > requests on the same database handle use that schema. > > - -- > Greg Sabino Mullane greg@turnstep.com > PGP Key: 0x14964AC8 200307231328 > > -----BEGIN PGP SIGNATURE----- > Comment: http://www.turnstep.com/pgp.html > > iD8DBQE/HsXXvJuQZxSWSsgRArfEAJ4+mIE7fTXnvf3JHS2Y3WmSoZwO/QCgxpx0 > RuTjTUI3hngy2T9BMqDEXpE= > =tvul > -----END PGP SIGNATURE----- > > > ---------------------------(end of > broadcast)--------------------------- > TIP 8: explain analyze is your friend >
On Wed, 2003-07-23 at 18:24, Richard Schilling wrote: > Can you give an example on how to execute that command? I've been > wondering about that too but haven't had time to read the documentation. SET search_path TO foo,'$user',public; http://developer.postgresql.org/docs/postgres/runtime-config.html