local_preload_libraries filenames converted to lowercase

Started by Josh Berkusalmost 16 years ago6 messagesbugs
Jump to latest
#1Josh Berkus
josh@agliodbs.com

Severity: minor

Tested On: 9.0b2, 8.4.4

Platform: SUN SPARC 4u Enterprise 450 Quad, presumably Solaris 10

Repeatable? Yes

Description:

See thread:
http://archives.postgresql.org/pgsql-testers/2010-06/msg00020.php

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#1)
Re: local_preload_libraries filenames converted to lowercase

Josh Berkus <josh@agliodbs.com> writes:

http://archives.postgresql.org/pgsql-testers/2010-06/msg00020.php

We'd need to see exactly how local_preload_libraries is being set.

regards, tom lane

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#1)
Re: local_preload_libraries filenames converted to lowercase

Josh Berkus <josh@agliodbs.com> writes:

http://archives.postgresql.org/pgsql-testers/2010-06/msg00020.php

OK, I looked at this a bit, and the answer is that load_libraries uses
SplitIdentifierString, ie, it thinks the value of the variable is a list
of comma-separated SQL identifiers. So if you want a
filename containing upper case, whitespace, or commas, double-quote it.

That might seem a bit bizarre, but because of the special meaning of
commas we'd need some quoting rule anyhow. I'm not sure it's worth
making local_preload_libraries have its own private parsing convention.
Perhaps this is just a documentation deficiency.

regards, tom lane

#4Josh Berkus
josh@agliodbs.com
In reply to: Tom Lane (#3)
Re: local_preload_libraries filenames converted to lowercase

That might seem a bit bizarre, but because of the special meaning of
commas we'd need some quoting rule anyhow. I'm not sure it's worth
making local_preload_libraries have its own private parsing convention.
Perhaps this is just a documentation deficiency.

Yes, I'd say that documentation is the answer, given. Hmmm .... are
double-quotes respected in postgresql.conf, though? Need testing.

--
-- Josh Berkus
PostgreSQL Experts Inc.
http://www.pgexperts.com

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Josh Berkus (#4)
Re: local_preload_libraries filenames converted to lowercase

Josh Berkus <josh@agliodbs.com> writes:

Yes, I'd say that documentation is the answer, given. Hmmm .... are
double-quotes respected in postgresql.conf, though? Need testing.

Not sure. Something like

local_preload_libraries = '"Foo", "Bar"'

will definitely work. Don't know if you can dispense with the outer
single quotes.

regards, tom lane

#6Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#5)
Re: local_preload_libraries filenames converted to lowercase

Tom Lane wrote:

Josh Berkus <josh@agliodbs.com> writes:

Yes, I'd say that documentation is the answer, given. Hmmm .... are
double-quotes respected in postgresql.conf, though? Need testing.

Not sure. Something like

local_preload_libraries = '"Foo", "Bar"'

will definitely work. Don't know if you can dispense with the outer
single quotes.

I have documented the requirement for double quotes; attached patch
applied.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

Attachments:

/rtmp/difftext/x-diffDownload+4-3