DBD::Pg, schema support

Started by Oleg Bartunovalmost 23 years ago4 messageshackers
Jump to latest
#1Oleg Bartunov
oleg@sai.msu.su

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

#2Greg Sabino Mullane
greg@turnstep.com
In reply to: Oleg Bartunov (#1)
Re: DBD::Pg, schema support

-----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-----

#3Richard Schilling
rschilling@nationalinformatics.net
In reply to: Greg Sabino Mullane (#2)
Re: DBD::Pg, schema support

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

Show quoted text

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

#4Arguile
arguile@lucentstudios.com
In reply to: Richard Schilling (#3)
Re: DBD::Pg, schema support

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