summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2005-12-22Adjust string comparison so that only bitwise-equal strings are consideredTom Lane
equal: if strcoll claims two strings are equal, check it with strcmp, and sort according to strcmp if not identical. This fixes inconsistent behavior under glibc's hu_HU locale, and probably under some other locales as well. Also, take advantage of the now-well-defined behavior to speed up texteq, textne, bpchareq, bpcharne: they may as well just do a bitwise comparison and not bother with strcoll at all. NOTE: affected databases may need to REINDEX indexes on text columns to be sure they are self-consistent.
2005-12-14Defend against crash while processing Describe Statement or Describe PortalTom Lane
messages, when client attempts to execute these outside a transaction (start one) or in a failed transaction (reject message, except for COMMIT/ROLLBACK statements which we can handle). Per report from Francisco Figueiredo Jr.
2005-12-09Translation updatesREL7_4_10Peter Eisentraut
2005-12-09Stamp 7.4.10.Tom Lane
2005-12-06In a nestloop inner indexscan, it's OK to use pushed-down baserestrictinfoTom Lane
clauses even if it's an outer join. This is a corner case since such clauses could only arise from weird OUTER JOIN ON conditions, but worth fixing. Per example from Ron at cheapcomplexdevices.com.
2005-12-05Add regression test to see if the min/max values of int8 convert correctly.Tom Lane
2005-12-03Fix out-of-order inclusion of -L switches from LDFLAGS on AIX and HPUX.Tom Lane
Per example from Dirk Pirschel.
2005-12-01Check for overflow in strtol() while parsing datetime inputs.Tom Lane
Michael Fuhr.
2005-11-18Fix performance issue in exprTypmod(): for a COALESCE expression, itTom Lane
recursed twice on its first argument, leading to exponential time spent on a deep nest of COALESCEs ... such as a deeply nested FULL JOIN would produce. Per report from Matt Carter.
2005-11-10When in transaction-aborted state, reject Bind message for portals containingTom Lane
anything but transaction-exiting commands (ROLLBACK etc). We already rejected Parse and Execute in such cases, so there seems little point in allowing Bind. This prevents at least an Assert failure, and probably worse things, since there's a lot of infrastructure that doesn't work when not in a live transaction. We can also simplify the Bind logic a bit by rejecting messages with a nonzero number of parameters, instead of the former kluge to silently substitute NULL for each parameter. Per bug #2033 from Joel Stevenson.
2005-11-03Fix longstanding race condition in transaction log management: there was aTom Lane
very narrow window in which SimpleLruReadPage or SimpleLruWritePage could think that I/O was needed when it wasn't (and indeed the buffer had already been assigned to another page). This would result in an Assert failure if Asserts were enabled, and probably in silent data corruption if not. Reported independently by Jim Nasby and Robert Creager. I intend a more extensive fix when 8.2 development starts, but this is a reasonably low-impact patch for the existing branches.
2005-10-25Fix longstanding bug that would sometimes let the planner generate a bad planTom Lane
for an outer join; symptom is bogus error "RIGHT JOIN is only supported with merge-joinable join conditions". Problem was that select_mergejoin_clauses did its tests in the wrong order. We need to force left join not right join for a merge join when there are non-mergeable join clauses; but the test for this only accounted for mergejoinability of the clause operator, and not whether the left and right Vars were of the proper relations. Per report from Jean-Pierre Pelletier.
2005-10-20Don't convert debug/notice/warning messages into errors just becauseTom Lane
they occur inside error processing. This is a back-port of a logic change already present in 8.0. Partial fix for bug#1976 --- doesn't cure the wrong-encoding problem, but at least stops it from causing unintended ERRORs.
2005-10-14Pass a strdup'd ident string to openlog(), to ensure that reallocationTom Lane
of GUC memory doesn't cause us to start emitting a bogus ident string. Per report from Han Holl. Also some trivial code cleanup in write_syslog.
2005-10-14[ Backpatch to 7.4.X.]Bruce Momjian
Also I fixed a bug in a bug fix I committed a few weeks ago. he check for a varchar pointer was incomplete. Michael Meskes
2005-10-12Fix longstanding bug found by Atsushi Ogawa: _bt_check_unique would markTom Lane
the wrong buffer dirty when trying to kill a dead index entry that's on a page after the one it started on. No risk of data corruption, just inefficiency, but still a bug.
2005-10-11Fix typo in sample pg_hba.conf; per IRC report from Bernhard Neuhauser.Neil Conway
2005-10-03COPY's test for read-only transaction was backward; it prohibited COPY TOREL7_4_9Tom Lane
where it should prohibit COPY FROM. Found by Alon Goldshuv.
2005-10-03Stamp release 7.4.9.Tom Lane
2005-09-28Repair planning bug introduced in 7.4: outer-join ON clauses that referencedTom Lane
only the inner-side relation would be considered as potential equijoin clauses, which is wrong because the condition doesn't necessarily hold above the point of the outer join. Per test case from Kevin Grittner (bug#1916).
2005-09-25[ Patch to 7.4.X.]Bruce Momjian
In several places PL/Python was calling PyObject_Str() and then PyString_AsString() without checking if the former had returned NULL to indicate an error. PyString_AsString() doesn't expect a NULL argument, so passing one causes a segmentation fault. This patch adds checks for NULL and raises errors via PLy_elog(), which prints details of the underlying Python exception. The patch also adds regression tests for these checks. All tests pass on my Solaris 9 box running HEAD and Python 2.4.1.
2005-09-03Translation updatePeter Eisentraut
2005-08-30Fix missing rows in queryTeodor Sigaev
update a=.. where a... with GiST index on column 'a' Backpatch from 8.0 branch
2005-08-25Back-patch fixes for problems with VACUUM destroying t_ctid chains too soon,Tom Lane
and with insufficient paranoia in code that follows t_ctid links. This patch covers the 7.4 branch.
2005-08-25Back-patch fix to correctly quote schema names in --no-owner mode.Tom Lane
Per gripe from Dick Kniep.
2005-08-24 - Check for NULL before checking whether argument is an array.Michael Meskes
- Removed stray character from string quoting. - Fixed check to report missing varchar pointer implementation.
2005-08-16Reject operator names >= NAMEDATALEN characters. These will not workTom Lane
anyway, and in assert-enabled builds you are likely to get an assertion failure. Backpatch as far as 7.3; 7.2 seems not to have the problem.
2005-08-15array_in() and array_recv() need to be more paranoid about validatingTom Lane
their OID parameter. It was possible to crash the backend with select array_in('{123}',0,0); because that would bypass the needed step of initializing the workspace. These seem to be the only two places with a problem, though (record_in and record_recv don't have the issue, and the other array functions aren't depending on user-supplied input). Back-patch as far as 7.4; 7.3 does not have the bug.
2005-08-07Fix count_usable_fds() to stop trying to open files once it reachesTom Lane
max_files_per_process. Going further than that is just a waste of cycles, and it seems that current Cygwin does not cope gracefully with deliberately running the system out of FDs. Per Andrew Dunstan.
2005-07-18MemSet() must not cast its pointer argument to int32* until after it hasTom Lane
checked that the pointer is actually word-aligned. Casting a non-aligned pointer to int32* is technically illegal per the C spec, and some recent versions of gcc actually generate bad code for the memset() when given such a pointer. Per report from Andrew Morrow.
2005-07-17Make pg_regress accept a command-line option for the temporary installation'sTom Lane
port number, and use a default value for it that is dependent on the configuration-time DEF_PGPORT. Should make the world safe for running parallel 'make check' in different branches. Back-patch as far as 7.4 so that this actually is useful.
2005-07-17Back-patch recent changes to alter the order of -L flags inserted fromTom Lane
LDFLAGS versus those built into the Makefiles. This looks like it will fix several buildfarm failures in the back branches.
2005-07-16ecpglib depends on last_path_separator from src/port/path.c, so we'dTom Lane
better include that in the library build. This was fixed in 8.0 and later, backport to 7.4 to fix buildfarm failure.
2005-07-16Back-patch 8.0's tightening of ORDER BY clauses in join regression test,Tom Lane
in hopes of eliminating buildfarm regression failure. (Not clear if we will need a join_1.out variant in this branch.)
2005-07-16The geometry_2 variant appears to be needed in 7.4 branch as well asTom Lane
later, per results from buildfarm member 'wallaroo'.
2005-07-14Fix mis-backport of libpq memory leak fix. Per Michael Fuhr.Tom Lane
2005-07-13Fix libpq memory leak during PQreset() --- closePGconn() was notTom Lane
freeing all transient state of the PGconn object.
2005-07-08Make libpq_gettext save and restore errno in a Windows-compatible way.Tom Lane
Also, back-patch fix into back branches.
2005-06-25Fix ancient memory leak in index_create(): RelationInitIndexAccessInfoTom Lane
was being called twice in normal operation, leading to a leak of one set of relcache subsidiary info. Per report from Jeff Gold.
2005-06-22Correct some code in pg_restore when reading the header of a tar archive:Neil Conway
(1) The code doesn't initialize `sum', so the initial "does the checksum match?" test is wrong. (2) The loop that is intended to check for a "null block" just checks the first byte of the tar block 512 times, rather than each of the 512 bytes one time (!), which I'm guessing was the intent. It was only through sheer luck that this worked in the first place. Per Coverity static analysis performed by EnterpriseDB.
2005-06-20plpgsql's exec_assign_value() freed the old value of a variable beforeTom Lane
copying/converting the new value, which meant that it failed badly on "var := var" if var is of pass-by-reference type. Fix this and a similar hazard in exec_move_row(); not sure that the latter can manifest before 8.0, but patch it all the way back anyway. Per report from Dave Chapeskie.
2005-06-18When using C-string lookup keys in a dynahash.c hash table, use strncpy()Tom Lane
not memcpy() to copy the offered key into the hash table during HASH_ENTER. This avoids possible core dump if the passed key is located very near the end of memory. Per report from Stefan Kaltenbrunner.
2005-06-17Translation updatesPeter Eisentraut
2005-06-14The random selection in function linear() could deliver a value equal to maxTom Lane
if geqo_rand() returns exactly 1.0, resulting in failure due to indexing off the end of the pool array. Also, since this is using inexact float math, it seems wise to guard against roundoff error producing values slightly outside the expected range. Per report from bug@zedware.org.
2005-06-11Fix bug in MIC -> EUC_JP conversion. Per Atsushi Ogawa.Tatsuo Ishii
2005-06-05Code for SET/SHOW TIME ZONE with a fixed-interval timezone was notTom Lane
prepared for HAVE_INT64_TIMESTAMP. Per report from Guillaume Beaudoin.
2005-06-02Push enable/disable of notify and catchup interrupts all the way downTom Lane
to just around the bare recv() call that gets a command from the client. The former placement in PostgresMain was unsafe because the intermediate processing layers (especially SSL) use facilities such as malloc that are not necessarily re-entrant. Per report from counterstorm.com.
2005-06-02Fixed memory leak in ecpglib by adding some missing free() commands.Michael Meskes
2005-05-31Add test to WAL replay to verify that xl_prev points back to the previousTom Lane
WAL record; this is necessary to be sure we recognize stale WAL records when a WAL page was only partially written during a system crash.
2005-05-29expandRTE and get_rte_attribute_type mistakenly always imputed typmod -1Tom Lane
to columns of an RTE that was a function returning RECORD with a column definition list. Apparently no one has tried to use non-default typmod with a function returning RECORD before.