Re: [HACKERS] pg_config/share_dir
Jim C. Nasby [EMAIL PROTECTED] writes: * Add options to pg_config to show the share_dir, sysconfdir, pkgincludedir, and localedir Should that be marked as a beginner TODO? It could, but I think it's going to get DONE in the next few days as a necessary step in fixing the pgxs relocatability issue. So if any beginners want to do it, they should step right up. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] pg_config/share_dir
Should that be marked as a beginner TODO? On Thu, Sep 22, 2005 at 11:04:23PM -0400, Bruce Momjian wrote: Added to TODO: * Add options to pg_config to show the share_dir, sysconfdir, pkgincludedir, and localedir --- Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? pg_config serves a function of recording the configuration, so I tend to agree with Andrew that this should be available. I notice that SYSCONFDIR, PKGINCLUDEDIR, and LOCALEDIR aren't available either. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] pg_config/share_dir
Added to TODO: * Add options to pg_config to show the share_dir, sysconfdir, pkgincludedir, and localedir --- Tom Lane wrote: Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? pg_config serves a function of recording the configuration, so I tend to agree with Andrew that this should be available. I notice that SYSCONFDIR, PKGINCLUDEDIR, and LOCALEDIR aren't available either. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match -- Bruce Momjian| http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [HACKERS] pg_config/share_dir
On Wednesday 07 September 2005 18:44, Peter Eisentraut wrote: Why do you need access to postgresql.conf.sample? We don't need access to that file, but install some sql files into the share dir, the test for postgresql.conf.sample is there just to see if the dir looks like a likely candidate to be the dir we are infact after.. -- Darcy Buskermolen Wavefire Technologies Corp. http://www.wavefire.com ph: 250.717.0200 fx: 250.763.1759 ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] pg_config/share_dir
On Wednesday 07 September 2005 17:31, Andrew Dunstan wrote: Darcy Buskermolen wrote: On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? the way wo do this in slony is with the following macro: AC_MSG_CHECKING(for postgresql.conf.sample) PGSHARE_POSSIBLE_LOCATIONS=${with_pgsharedir} /usr/local/pgsql/share /usr/local/share/postgresql /usr/share/postgresql /usr/local/share/pgsql /usr/share/pgsql /opt/local/pgsql/share /opt/pgsql/share ${PG_BINDIR}/../share for i in $PGSHARE_POSSIBLE_LOCATIONS; do if test -s $i/postgresql.conf.sample ; then PG_SHAREDIR=$i/ break; fi done if test -n $PG_SHAREDIR ; then AC_MSG_RESULT(${PG_SHAREDIR}postgresql.conf.sample) AC_DEFINE(PG_SHAREDIR_VERIFIED,1,[PostgreSQL sharedir]) else AC_MSG_RESULT(not found) AC_MSG_ERROR( postgresql.conf.sample not found! Please specify the sharedir with --with-pgsharedir=dir ) fi (where ${PG_BINDIR} is the result of: pg_config --bindir ) That's foul, and looks horribly fragile too. You have just provided what seems to me a perfect use case. Yes it is foul :-) but it's the best we could do given the tools we had to work with. which is precisely why we provide the failover to -with-pgsharedir=dir incase the system can't get it right. cheers andrew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq -- Darcy Buskermolen Wavefire Technologies Corp. http://www.wavefire.com ph: 250.717.0200 fx: 250.763.1759 ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org
Re: [HACKERS] pg_config/share_dir
Darcy Buskermolen wrote: We don't need access to that file, but install some sql files into the share dir, the test for postgresql.conf.sample is there just to see if the dir looks like a likely candidate to be the dir we are infact after.. Then my response is that Slony has absolutely no business installing its files into one of PostgreSQL's private directories. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [HACKERS] pg_config/share_dir
Peter Eisentraut wrote: Darcy Buskermolen wrote: We don't need access to that file, but install some sql files into the share dir, the test for postgresql.conf.sample is there just to see if the dir looks like a likely candidate to be the dir we are infact after.. Then my response is that Slony has absolutely no business installing its files into one of PostgreSQL's private directories. Why be so prescriptive? pgxs already exposes share_dir/contrib as an install target via DATA and DATA_built. Arguably, other modules would be playing nicer if they put their private stuff in some other private share_dir/subdirectory rather than under contrib. cheers andrew ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] pg_config/share_dir
Andrew Dunstan wrote: Why be so prescriptive? We're not prescribing anything. You can install your stuff anywhere you want to, but we're certainly not going to encourage or facilitate that other software installs files in directories that belong to PostgreSQL, except where this is specifically intended (e.g., $libdir). -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 6: explain analyze is your friend
Re: [HACKERS] pg_config/share_dir
Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings
Re: [HACKERS] pg_config/share_dir
Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? Why would they need pkglibdir either? I was asked about this by an author who wanted to use it to find where to put module config/setup scripts. cheers andrew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [HACKERS] pg_config/share_dir
Andrew Dunstan wrote: Why would they need pkglibdir either? To determine what $libdir resolves to. I was asked about this by an author who wanted to use it to find where to put module config/setup scripts. Probably not in PostgreSQL's data directory, but his own. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] pg_config/share_dir
On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? the way wo do this in slony is with the following macro: AC_MSG_CHECKING(for postgresql.conf.sample) PGSHARE_POSSIBLE_LOCATIONS=${with_pgsharedir} /usr/local/pgsql/share /usr/local/share/postgresql /usr/share/postgresql /usr/local/share/pgsql /usr/share/pgsql /opt/local/pgsql/share /opt/pgsql/share ${PG_BINDIR}/../share for i in $PGSHARE_POSSIBLE_LOCATIONS; do if test -s $i/postgresql.conf.sample ; then PG_SHAREDIR=$i/ break; fi done if test -n $PG_SHAREDIR ; then AC_MSG_RESULT(${PG_SHAREDIR}postgresql.conf.sample) AC_DEFINE(PG_SHAREDIR_VERIFIED,1,[PostgreSQL sharedir]) else AC_MSG_RESULT(not found) AC_MSG_ERROR( postgresql.conf.sample not found! Please specify the sharedir with --with-pgsharedir=dir ) fi (where ${PG_BINDIR} is the result of: pg_config --bindir ) Why would they need pkglibdir either? I was asked about this by an author who wanted to use it to find where to put module config/setup scripts. cheers andrew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq -- Darcy Buskermolen Wavefire Technologies Corp. http://www.wavefire.com ph: 250.717.0200 fx: 250.763.1759 ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] pg_config/share_dir
Peter Eisentraut [EMAIL PROTECTED] writes: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? pg_config serves a function of recording the configuration, so I tend to agree with Andrew that this should be available. I notice that SYSCONFDIR, PKGINCLUDEDIR, and LOCALEDIR aren't available either. regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] pg_config/share_dir
Tom Lane wrote: pg_config serves a function of recording the configuration, pg_config was meant (as opposed to serves) to provide information that is of use for building third-party things. Hence includedir, libdir for building, pkglibdir for installing. The option --configure records the configuration, if you like, but I don't see the point of giving users direct access to directories that they have no use for. I mean, what would anyone want to do with pg_config --localedir? Certainly not store the locale files of his own module there. There is a point to be made that sysconfdir should be exposed, perhaps for the benefit of GUI configuration editors, but that seems theoretical to me. -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster
Re: [HACKERS] pg_config/share_dir
Darcy Buskermolen wrote: On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote: Peter Eisentraut wrote: Andrew Dunstan wrote: pg_config doesn't currently seem to have an option to report the share_dir. Should it? Is there a case where a user would need anything from there? the way wo do this in slony is with the following macro: AC_MSG_CHECKING(for postgresql.conf.sample) PGSHARE_POSSIBLE_LOCATIONS=${with_pgsharedir} /usr/local/pgsql/share /usr/local/share/postgresql /usr/share/postgresql /usr/local/share/pgsql /usr/share/pgsql /opt/local/pgsql/share /opt/pgsql/share ${PG_BINDIR}/../share for i in $PGSHARE_POSSIBLE_LOCATIONS; do if test -s $i/postgresql.conf.sample ; then PG_SHAREDIR=$i/ break; fi done if test -n $PG_SHAREDIR ; then AC_MSG_RESULT(${PG_SHAREDIR}postgresql.conf.sample) AC_DEFINE(PG_SHAREDIR_VERIFIED,1,[PostgreSQL sharedir]) else AC_MSG_RESULT(not found) AC_MSG_ERROR( postgresql.conf.sample not found! Please specify the sharedir with --with-pgsharedir=dir ) fi (where ${PG_BINDIR} is the result of: pg_config --bindir ) That's foul, and looks horribly fragile too. You have just provided what seems to me a perfect use case. cheers andrew ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq
Re: [HACKERS] pg_config/share_dir
Why do you need access to postgresql.conf.sample? -- Peter Eisentraut http://developer.postgresql.org/~petere/ ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq