Re: [BUGS] Termination When Switching between PL/Perl and PL/PerlU

2010-01-13 Thread Tom Lane
Craig Ringer writes: > David E. Wheeler wrote: >> Found in 8.4.2, replicated in HEAD. Steps: >> >> 1. Create PL/Perl function. >> 2. Run it. >> 3. Create same function with PL/PerlU >> 4. Run it. >> 5. Create same function again with PL/Perl >> 6. Boom. > This was just discussed in -HACKERS. Hav

Re: [BUGS] Termination When Switching between PL/Perl and PL/PerlU

2010-01-13 Thread Craig Ringer
David E. Wheeler wrote: > Found in 8.4.2, replicated in HEAD. Steps: > > 1. Create PL/Perl function. > 2. Run it. > 3. Create same function with PL/PerlU > 4. Run it. > 5. Create same function again with PL/Perl > 6. Boom. This was just discussed in -HACKERS. Have a look at the archives. -- Crai

Re: [BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread Tom Lane
Bruce Momjian writes: > Tom Lane wrote: >> But we force those to be the same in main.c. Anyway there are several >> other uses of access() in the code ... > Yea, I am not saying the text is right, but rather why it was not > considered for use in that case. Actually, since that code has been un

Re: [BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > I think access's reputation as something to avoid caused us not to look > > at it. My old BSD manual says about access(): > > > CAVEAT > > The access() function should be used rarely, if ever. Specifically, > > access() should never be used

Re: [BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread Tom Lane
Bruce Momjian writes: > I think access's reputation as something to avoid caused us not to look > at it. My old BSD manual says about access(): > CAVEAT > The access() function should be used rarely, if ever. Specifically, > access() should never be used by any program whose user real

Re: [BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread Bruce Momjian
Tom Lane wrote: > "James Bellinger" writes: > > I'm not certain of the actual *purpose* for this function even checking in > > the first place, but the result is that, if Postgres gets its access via an > > ACL, it will say 'invalid binary' here and there, will not be able to find > > its own exec

Re: [BUGS] BUG #5269: postgres backend terminates with SIGSEGV

2010-01-13 Thread Justin Pitts
Sorry for the delay. I am attempting to construct a JDBC test case that reproduces the problem. I have installed the patch and have not seen the crash since. On Jan 13, 2010, at 11:58 AM, Tom Lane wrote: > I wrote: >> After puzzling over this for many hours, I have a theory that seems to >> fi

Re: [BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread Tom Lane
"James Bellinger" writes: > I'm not certain of the actual *purpose* for this function even checking in > the first place, but the result is that, if Postgres gets its access via an > ACL, it will say 'invalid binary' here and there, will not be able to find > its own executables, etc. I can see no

[BUGS] BUG #5275: validate_exec in port/exec.c only reads u/g/o, not ACLs

2010-01-13 Thread James Bellinger
The following bug has been logged online: Bug reference: 5275 Logged by: James Bellinger Email address: j...@zer7.com PostgreSQL version: 8.4.2 Operating system: Ubuntu 9.10 Description:validate_exec in port/exec.c only reads u/g/o, not ACLs Details: Howdy, I'm not

[BUGS] BUG #5274: [PL/PgSQL] EXECUTE ... USING variable expansion

2010-01-13 Thread Vincenzo Romano
The following bug has been logged online: Bug reference: 5274 Logged by: Vincenzo Romano Email address: vincenzo.rom...@notorand.it PostgreSQL version: 8.4.2 Operating system: Linux Description:[PL/PgSQL] EXECUTE ... USING variable expansion Details: My system says:

[BUGS] Termination When Switching between PL/Perl and PL/PerlU

2010-01-13 Thread David E. Wheeler
Found in 8.4.2, replicated in HEAD. Steps: 1. Create PL/Perl function. 2. Run it. 3. Create same function with PL/PerlU 4. Run it. 5. Create same function again with PL/Perl 6. Boom. Example on HEAD built today (ignore the error from the plperl version, that's the issue I'm trying to fix locally

Re: [BUGS] Substring auto trim

2010-01-13 Thread Kevin Grittner
Tom Lane wrote: > "Kevin Grittner" writes: >> This looks like another situation where we're running into >> trouble because of non-standard behavior when people might be >> expecting something consistent with other products and the >> explicit language in the standard. > > If we were to change

Re: [BUGS] Substring auto trim

2010-01-13 Thread Tom Lane
"Kevin Grittner" writes: > Tom Lane wrote: >> What's the data type of the value being compared to? I get, for >> instance, >> >> postgres=# select substr('ab '::char(4), 1, 4) = 'ab '::char(4); > This looks like another situation where we're running into trouble > because of non-standard be

Re: [BUGS] BUG #5269: postgres backend terminates with SIGSEGV

2010-01-13 Thread Tom Lane
I wrote: > After puzzling over this for many hours, I have a theory that seems to > fit the facts. I think the attached patch will fix it for you --- please test. regards, tom lane Index: src/backend/utils/cache/plancache.c

Re: [BUGS] BUG #2197: PostgreSQL error- 'could not read block 0 of relation'

2010-01-13 Thread Greg Stark
What postgres version? In any case there is not enough information here to identify what happened. What does "not all key references had been cleaned up" mean? What commands did you run and what results did they have? On Tue, Jan 12, 2010 at 4:26 PM, Ted Clark wrote: > BUG #2197: PostgreSQL erro

Re: [BUGS] Substring auto trim

2010-01-13 Thread Kevin Grittner
Tom Lane wrote: > What's the data type of the value being compared to? I get, for > instance, > > postgres=# select substr('ab '::char(4), 1, 4) = 'ab '::char(4); > ?column? > -- > t > (1 row) This looks like another situation where we're running into trouble because of non-stan

Re: [BUGS] Substring auto trim

2010-01-13 Thread Tom Lane
"Charles O'Farrell" writes: > We have a column 'foo' which is of type character (not varying). > select substr(foo, 1, 10) from bar > The result of this query are values whose trailing spaces have been trimmed > automatically. This causes incorrect results when comparing to a value that > may co

Re: [BUGS] Substring auto trim

2010-01-13 Thread Pavel Stehule
2010/1/13 Pavel Stehule : > Hello > > 2010/1/13 Charles O'Farrell : >> Hi guys, >> >> I'm not sure whether this a really dumb question, but I'm curious as to what >> might be the problem. >> >> We have a column 'foo' which is of type character (not varying). >> >> select substr(foo, 1, 10) from bar

Re: [BUGS] Substring auto trim

2010-01-13 Thread Pavel Stehule
Hello 2010/1/13 Charles O'Farrell : > Hi guys, > > I'm not sure whether this a really dumb question, but I'm curious as to what > might be the problem. > > We have a column 'foo' which is of type character (not varying). > > select substr(foo, 1, 10) from bar > > The result of this query are value

[BUGS] Substring auto trim

2010-01-13 Thread Charles O'Farrell
Hi guys, I'm not sure whether this a really dumb question, but I'm curious as to what might be the problem. We have a column 'foo' which is of type character (not varying). select substr(foo, 1, 10) from bar The result of this query are values whose trailing spaces have been trimmed automatical