summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2004-01-06Code cleanup, mostly in the smgr:Neil Conway
- Update comment in IsReservedName() to the present day - Improve some variable & function names in commands/vacuum.c. I was planning to rewrite this to avoid lappend(), but since I still intend to do the list rewrite, there's no need for that. - Update some smgr comments which seemed to imply that we still forced all dirty pages to disk at commit-time. - Replace some #ifdef DIAGNOSTIC code with assertions. - Make the distinction between OS-level file descriptors and virtual file descriptors a little clearer in a few comments - Other minor comment improvements in the smgr code
2004-01-06Remove unused 'noversion' command-line option processing from theNeil Conway
backend.
2004-01-06Make the 'wal_debug' GUC variable a boolean (rather than an integer), andNeil Conway
hide it behind #ifdef WAL_DEBUG blocks.
2004-01-06Instead of rechecking lossy index operators by putting them into theTom Lane
regular qpqual ('filter condition'), add special-purpose code to nodeIndexscan.c to recheck them. This ends being almost no net addition of code, because the removal of planner code balances out the extra executor code, but it is significantly more efficient when a lossy operator is involved in an OR indexscan. The old implementation had to recheck the entire indexqual in such cases.
2004-01-05Adjust indexscan planning logic to keep RestrictInfo nodes associatedTom Lane
with index qual clauses in the Path representation. This saves a little work during createplan and (probably more importantly) allows reuse of cached selectivity estimates during indexscan planning. Also fix latent bug: wrong plan would have been generated for a 'special operator' used in a nestloop-inner-indexscan join qual, because the special operator would not have gotten into the list of quals to recheck. This bug is only latent because at present the special-operator code could never trigger on a join qual, but sooner or later someone will want to do it.
2004-01-05Trivial refactoring: move analysis of ViewStmt into its own function forNeil Conway
readability and for the sake of consistency with the rest of analyze.c
2004-01-05Fix three trivial typos in comments.Neil Conway
2004-01-05Translation updatesPeter Eisentraut
2004-01-05Improve UniquePath logic to detect the case where the input is alreadyTom Lane
known unique (eg, it is a SELECT DISTINCT ... subquery), and not do a redundant unique-ification step.
2004-01-05Dept. of second thoughts: clause_selectivity shouldn't try to cache itsTom Lane
result for jointypes associated with IN processing.
2004-01-05Add the ability to extract OR indexscan conditions from OR-of-ANDTom Lane
join conditions in which each OR subclause includes a constraint on the same relation. This implements the other useful side-effect of conversion to CNF format, without its unpleasant side-effects. As per pghackers discussion of a few weeks ago.
2004-01-04Fixed bug in GRANT OPTION FOR parsing.Michael Meskes
2004-01-04There's no longer any good reason for genbki.sh and Gen_fmgrtab.sh toTom Lane
run the data through cpp, and we know of at least one platform where unusual cpp behavior breaks the process. So remove the cpp step, and make consequent simplifications.
2004-01-04Fix portability bugs: char values passed to <ctype.h> functions mustTom Lane
be cast to unsigned char. We have learned this the hard way before.
2004-01-04Fix discrepancy in prototypes for HPUX pg_dlerror.Tom Lane
2004-01-04Fix ReadOffset() to work correctly when off_t is wider than int.Tom Lane
2004-01-04Merge restrictlist_selectivity into clauselist_selectivity byTom Lane
teaching the latter to accept either RestrictInfo nodes or bare clause expressions; and cache the selectivity result in the RestrictInfo node when possible. This extends the caching behavior of approx_selectivity to many more contexts, and should reduce duplicate selectivity calculations.
2004-01-04Remove trailing newline from file.Bruce Momjian
2004-01-04Remove trailing semicolons from macro initializations in plpython.Bruce Momjian
Problem report on True64 Unix by Nikola Milutinovic.
2004-01-04Mention grabbing typedefs from pgsql/lib too.Bruce Momjian
2004-01-04Rewrite OR indexscan processing to be more flexible. We can now for theTom Lane
first time generate an OR indexscan for a two-column index when the WHERE condition is like 'col1 = foo AND (col2 = bar OR col2 = baz)' --- before, the OR had to be on the first column of the index or we'd not notice the possibility of using it. Some progress towards extracting OR indexscans from subclauses of an OR that references multiple relations, too, although this code is #ifdef'd out because it needs more work.
2004-01-03Must test for __hppa__ as well as __hppa to make linux-hppa happy.Tom Lane
2004-01-01Do an explicit fflush after writing a progress message with puts.Tom Lane
This ensures stdout is kept in sync with messages on stderr. Per report from Olaf Ferger.
2003-12-31Make Solaris non-gcc thread flag "-mt" a compile flag, not a link flag.Bruce Momjian
2003-12-30Adjust the definition of RestrictInfo's left_relids and right_relidsTom Lane
fields: now they are valid whenever the clause is a binary opclause, not only when it is a potential join clause (there is a new boolean field canjoin to signal the latter condition). This lets us avoid recomputing the relid sets over and over while examining indexes. Still more work to do to make this as useful as it could be, because there are places that could use the info but don't have access to the RestrictInfo node.
2003-12-30Add "-mt" link flag for Solaris non-gcc compiles when using threads ---Bruce Momjian
required.
2003-12-30Instead of trying to force WHERE clauses into CNF or DNF normal form,Tom Lane
just look for common clauses that can be pulled out of ORs. Per recent discussion, extracting common clauses seems to be the only really useful effect of normalization, and if we do it explicitly then we can avoid cluttering the qual with partially-redundant duplicated expressions, which was an unpleasant side-effect of the old approach.
2003-12-30Avoid running out of memory during hash_create, by not passing aTom Lane
number-of-buckets that exceeds the size we actually plan to allow the hash table to grow to. Per trouble report from Sean Shanny.
2003-12-30ShmemInitHash forgot to specify HASH_ALLOC flag bit in its hash_createTom Lane
call. You'd think this would cause some problems, but because of the way hash_create is coded, the only side-effect was creation of a useless memory context for the hashtable.
2003-12-29Use hash table name, not one-size-fits-all 'DynaHashTable', to identifyTom Lane
memory contexts belonging to hash tables. Makes the memory stats printout a little more useful.
2003-12-29Using canonicalize_qual() to get rid of duplicate index predicateTom Lane
conditions is overkill; set_union() does the job about as well, and much more efficiently. Furthermore this avoids assuming that canonicalize_qual() will check for duplicate clauses at all, which it may not always do.
2003-12-29Improve comment.Tom Lane
2003-12-29Tweak OpernameGetCandidates() to reduce palloc overhead --- profilingTom Lane
showed that for common operator names such as '=', the pallocs done by this routine occupied a surprisingly large fraction of the total time for the parser to process an operator.
2003-12-29Added missing whitespaces to array argument parsing.Michael Meskes
2003-12-28Clean up the usage of canonicalize_qual(): in particular, be consistentTom Lane
about whether it is applied before or after eval_const_expressions(). I believe there were some corner cases where the system would fail to recognize that a partial index is applicable because of the previous inconsistency. Store normal rather than 'implicit AND' representations of constraints and index predicates in the catalogs. initdb forced due to representation change of constraints/predicates.
2003-12-28Fix sanity-check code that mistakenly assumed error and notice messagesTom Lane
could never exceed 30K. Per report from Andreas Pflug.
2003-12-28Avoid infinite loop if connection is lost during PQexecStart() orTom Lane
PQexecFinish(). Per report from Andreas Pflug.
2003-12-27Improve spinlock code for recent x86 processors: insert a PAUSETom Lane
instruction in the s_lock() wait loop, and use test before test-and-set in TAS() macro to avoid unnecessary bus traffic. Patch from Manfred Spraul, reworked a bit by Tom.
2003-12-25Continued rearrangement to permit pgstat + BootstrapMain processes to beBruce Momjian
fork/exec'd, in the same mode as the previous patch for backends. Claudio Natoli
2003-12-25Patch that makes quoting "sameuser", "samegroup", and "all" removeBruce Momjian
special meaning of these terms in pg_hba.conf. Also changes ugly pg_hba.conf IPv6 netmask of ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff to ::1/128. Andrew Dunstan
2003-12-25> > I have no idea if this in Oracle or not. But it's something IBruce Momjian
> > needed, and other people in the past asked about it too. > > It is in Oracle, but you aren't exactly on the spot. It should be > > IYYY - 4 digits ('2003') > IYY - 3 digits ('003') > IY - 2 digits ('03') > I - 1 digit ('3') Here is an updated patch that does that. Kurt Roeckx
2003-12-24Fixed segfault in parsing of EXEC SQL SELECT * FROM foo() AS TBL( c int, i int);Michael Meskes
2003-12-23Supress non-temp schemas from psql \dn display.Bruce Momjian
2003-12-23Use inlined TAS() on PA-RISC, if we are compiling with gcc.Tom Lane
Patch inspired by original submission from ViSolve.
2003-12-23Fix a number of places where reconfiguring with a different installationTom Lane
prefix would fail, because the new path did not get propagated to where it needed to be. Note this would fail even with --enable-depend.
2003-12-23Fix compile warning.Tom Lane
2003-12-23More bogosity in alter_table test: sometimes causes prepare test to failTom Lane
by means of arbitrarily renaming tables the other test depends on.
2003-12-23alter_table test sometimes failed in parallel mode, because of transientTom Lane
table name conflict against rangefuncs test.
2003-12-23Push responsibility for selecting out-of-line-assembler TAS code out toTom Lane
the platform template files, instead of doing it directly in configure.in. This seems cleaner, and also opens the door to making the choice be dependent on the compiler being used.
2003-12-23Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platformsTom Lane
that were broken, try to make layout of s_lock.h entries consistent, use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outside s_lock.h itself.