Commit Graph

5034 Commits

Author SHA1 Message Date
Tom Lane db436adf76 Major revision of sort-node handling: push knowledge of query
sort order down into planner, instead of handling it only at the very top
level of the planner.  This fixes many things.  An explicit sort is now
avoided if there is a cheaper alternative (typically an indexscan) not
only for ORDER BY, but also for the internal sort of GROUP BY.  It works
even when there is no other reason (such as a WHERE condition) to consider
the indexscan.  It works for indexes on functions.  It works for indexes
on functions, backwards.  It's just so cool...

CAUTION: I have changed the representation of SortClause nodes, therefore
THIS UPDATE BREAKS STORED RULES.  You will need to initdb.
1999-08-21 03:49:17 +00:00
Tom Lane 5588c559e6 Cleanups for int8: guard against null inputs in comparison
operators (and some other places), fix rangechecks in int8 to int4
conversion (same problem we recently figured out in pg_atoi).
1999-08-21 03:06:58 +00:00
Tom Lane d91baea025 Ooops ... I had left some test coding in selfuncs.c that
failed on 'field < textconstant' ...
1999-08-21 00:56:18 +00:00
Tatsuo Ishii 02efaa14e5 Old multi-byte bug. Forgot to rename #ifdef MB to #ifdef MULTIBYTE
Now SET NAMES working again...
1999-08-18 13:04:45 +00:00
Tom Lane abee4c299f Remove extraneous SeqScan node that make_noname was inserting
above a Sort or Materialize node.  As far as I can tell, the only place
that actually needed that was set_tlist_references, which was being lazy
about checking to see if it had a noname node to fix or not...
1999-08-18 04:15:16 +00:00
Tom Lane 6defe4949e Add script that runs the regression tests with all valid
combinations of query-plan-type backend options.  Good for testing
planner/optimizer.  Tedious, though.
1999-08-17 21:21:22 +00:00
Tom Lane ed3f69168f EXPLAIN didn't know about 'Materialize' plan nodes. 1999-08-16 23:47:23 +00:00
Tom Lane 91f82de48a Assign sort keys properly when there are duplicate entries in
pathkey list --- corrects misbehavior seen with multiple mergejoin clauses
mentioning same variable.
1999-08-16 23:07:20 +00:00
Bruce Momjian 972124091d I've sent 3 mails to pgsql-patches. There are two files, one for doc
and
for src/data directories, and one minor patch for doc/README.locale.
   Please apply.

Oleg.
1999-08-16 20:27:19 +00:00
Bruce Momjian c5d0a1bc42 Fix for perl5 on BSD/OS. 1999-08-16 20:12:12 +00:00
Bruce Momjian e69a997d02 Allow BSD yacc and bison to compile pl code. 1999-08-16 19:57:21 +00:00
Tom Lane e6381966c1 Major planner/optimizer revision: get rid of PathOrder node type,
store all ordering information in pathkeys lists (which are now lists of
lists of PathKeyItem nodes, not just lists of lists of vars).  This was
a big win --- the code is smaller and IMHO more understandable than it
was, even though it handles more cases.  I believe the node changes will
not force an initdb for anyone; planner nodes don't show up in stored
rules.
1999-08-16 02:17:58 +00:00
Tom Lane 08320bfb22 Small updates to #include lists for pending optimizer checkin. 1999-08-16 02:10:13 +00:00
Tom Lane c9b128fcdb Move funcid_get_rettype() to lsyscache. 1999-08-16 02:08:59 +00:00
Tom Lane b1baf1ff60 Add get_func_rettype() to general-use lsyscache routines,
since it's now needed in both optimizer and parser.
1999-08-16 02:06:25 +00:00
Tatsuo Ishii bab13a70ff Fix for Win32 making problem with MB enabled.
Patches created by Hiroki Kataoka.
1999-08-16 02:04:05 +00:00
Thomas G. Lockhart 3cfd56fcf6 Repair the check for redundant UNIQUE and PRIMARY KEY indices.
Also, improve it so that it checks for multi-column constraints.
Thanks to Mark Dalphin <mdalphin@amgen.com> for reporting the problem.
1999-08-15 06:46:49 +00:00
Tom Lane 288373f5a4 LispUnion fix changes output ordering for inheritance tests. 1999-08-14 19:30:21 +00:00
Tom Lane 51e29a2be3 LispUnion routine didn't generate a proper union: anytime
l2 contained more than one entry, there would be duplicates in the output
list.  Miscellaneous code beautification in other routines, too.
1999-08-14 19:29:35 +00:00
Tom Lane 47f18ec702 Update comments about pathkeys. 1999-08-13 01:17:16 +00:00
Tom Lane 8f9f6e51a8 Clean up optimizer's handling of indexscan quals that need to be
commuted (ie, the index var appears on the right).  These are now handled
the same way as merge and hash join quals that need to be commuted: the
actual reversing of the clause only happens if we actually choose the path
and generate a plan from it.  Furthermore, the clause is only reversed in
the 'indexqual' field of the plan, not in the 'indxqualorig' field.  This
allows the clause to still be recognized and removed from qpquals of upper
level join plans.  Also, simplify and generalize match_clause_to_indexkey;
now it recognizes binary-compatible indexes for join as well as restriction
clauses.
1999-08-12 04:32:54 +00:00
Tom Lane aae034d28c Add commentary to show that even though ExecInitIndexScan()
contains much code that looks like it will handle indexquals with the index
key on either side of the operator, in fact indexquals must have the index
key on the left because of limitations of the ScanKey machinery.  Perhaps
someone will be motivated to fix that someday...
1999-08-12 00:42:43 +00:00
Tom Lane 2ae51c86c9 Minor cleanups and code beautification; eliminate some
routines that are now dead code.
1999-08-10 03:00:15 +00:00
Tom Lane 4a1c5cb953 Revise create_nestloop_node's handling of inner indexscan to
work under a wider range of scenarios than it did --- it formerly did not
handle a multi-pass inner scan, nor cases in which the inner scan's
indxqualorig or non-index qual contained outer var references.  I am not
sure that these limitations could be hit in the existing optimizer, but
they need to be fixed for future expansion.
1999-08-10 02:58:56 +00:00
Bruce Momjian 158fd5f1c4 > > Prevent sorting if result is already sorted
> >
> > was implemented by Jan Wieck.
> > His work is for ascending order cases.
> >
> > Here is a patch to prevent sorting also in descending
> > order cases.
> > Because I had already changed _bt_first() to position
> > backward correctly before v6.5,this patch would work.
> >
Hiroshi Inoue
Inoue@tpf.co.jp
1999-08-09 06:20:27 +00:00
Tom Lane 5efe31214a Clean up tlist.c tree-walking routines with
expression_tree_mutator.
1999-08-09 05:34:13 +00:00
Tom Lane 14f84cd821 Store -1 in attdisbursion to signal 'no duplicates in column'.
Centralize att_disbursion readout logic.
1999-08-09 03:16:47 +00:00
Tom Lane 5af4b04f31 Move get_attdisbursion to lsyscache. Clean up get_typdefault. 1999-08-09 03:13:31 +00:00
Tom Lane e9054829a2 Update comments about attdisbursion. NO code change. 1999-08-09 02:45:56 +00:00
Vadim B. Mikheev 1ecb43a40c Re-use free space on index pages with duplicates. 1999-08-09 01:39:19 +00:00
Tom Lane 10d6d411a8 Rewrite fix_indxqual_references, which was entirely bogus for
multi-scan indexscan plans; it tried to use the same table-to-index
attribute mapping for all the scans, even if they used different indexes.
It would klugily work as long as OR indexquals never used multikey indexes,
but that's not likely to hold up much longer...
1999-08-09 01:01:42 +00:00
Tom Lane ecef2caae9 Clean up routines in setrefs.c by replacing individual tree
walking logic with expression_tree_walker/mutator calls.
1999-08-09 00:56:05 +00:00
Tom Lane 6bc601b648 Create a standardized expression_tree_mutator support routine
to go along with expression_tree_walker.  (_walker is not suitable for
routines that need to alter the tree structure significantly.)  Other minor
cleanups in clauses.c.
1999-08-09 00:51:26 +00:00
Bruce Momjian f0b651ac6b replace #Include . 1999-08-09 00:08:52 +00:00
Tom Lane 4488b69b4c Fix nbtree's failure to clear BTScans list during xact abort.
Also, move responsibility for calling vc_abort into main xact.c list of
things-to-call-at-abort.  What in the world was it doing down inside of
TransactionIdAbort()?
1999-08-08 20:12:52 +00:00
Tom Lane fb491a5854 For a unique-key attribute (no duplicate values), vacuum analyze
was recording a disbursion of 0, not the correct value 1/numberOfRows.
1999-08-08 17:13:10 +00:00
Thomas G. Lockhart a76ad509fe Remove old man pages. All info is in new man pages or other docs. 1999-08-08 15:21:50 +00:00
Bruce Momjian 4cddd482c1 Fix so BSD yacc works on file. 1999-08-07 04:25:02 +00:00
Tom Lane e1fad50a5d Revise generation of hashjoin paths: generate one path per
hashjoinable clause, not one path for a randomly-chosen element of each
set of clauses with the same join operator.  That is, if you wrote
   SELECT ... WHERE t1.f1 = t2.f2 and t1.f3 = t2.f4,
and both '=' ops were the same opcode (say, all four fields are int4),
then the system would either consider hashing on f1=f2 or on f3=f4,
but it would *not* consider both possibilities.  Boo hiss.
Also, revise estimation of hashjoin costs to include a penalty when the
inner join var has a high disbursion --- ie, the most common value is
pretty common.  This tends to lead to badly skewed hash bucket occupancy
and way more comparisons than you'd expect on average.
I imagine that the cost calculation still needs tweaking, but at least
it generates a more reasonable plan than before on George Young's example.
1999-08-06 04:00:17 +00:00
Tom Lane b7883d7e3a parse_coerce fix allows early simplification of one
constant-coercion expression in the rules test.
1999-08-05 02:35:29 +00:00
Tom Lane fd19a350ea Revise parse_coerce() to handle coercion of int and float
constants, not only string constants, at parse time.  Get rid of
parser_typecast2(), which is bogus and redundant...
1999-08-05 02:33:54 +00:00
Tom Lane b15a7c9fbe Fix ELF test so it doesn't spit up on all non-ELF systems...
use Autoconf-approved method of testing for predefined symbols, and move
it down to where we know what compiler to run and how to run it.
1999-08-03 00:09:32 +00:00
Tom Lane b0984e6995 Add a VACUUM command in hopes of making pg_upgrade usable again
in MVCC environment.  I do not trust this until Vadim says it's OK...
1999-08-02 22:34:53 +00:00
Michael Meskes b2a2be4c5a *** empty log message *** 1999-08-02 04:59:18 +00:00
Tom Lane 8624ff7612 Further selectivity-estimation work. Speed up eqsel()
(it should just call the given operator, not look up an = operator).
Fix intltsel() so that all numeric data types are converted to double
before trying to estimate where the given comparison value is in the
known range of column values.  intltsel() still needs work, or replacement,
for non-numeric data types ... but for nonintegral numeric types it
should now be delivering reasonable estimates.
1999-08-02 02:05:41 +00:00
Bruce Momjian 9032d3f205 autoconf 1999-08-01 16:36:57 +00:00
Bruce Momjian b2a0a4e8f5 I didn't see any further discussion so here is, I hope, a clean fix to
configure.in to determine if a system is ELF or not.  Note that some
of the tests earlier may be redundant but I took the safest route.

D'Arcy J.M. Cain
1999-08-01 16:30:05 +00:00
Tom Lane 44878506d8 First step in fixing selectivity-estimation code. eqsel and
neqsel now behave as per my suggestions in pghackers a few days ago.
selectivity for < > <= >= should work OK for integral types as well, but
still need work for nonintegral types.  Since these routines have never
actually executed before :-(, this may result in some significant changes
in the optimizer's choices of execution plans.  Let me know if you see
any serious misbehavior.
CAUTION: THESE CHANGES REQUIRE INITDB.  pg_statistic table has changed.
1999-08-01 04:54:25 +00:00
Tom Lane f851c6b07d Add another ORDER BY to rules test; got tired of it 'failing'
every time I tweak the optimizer...
1999-08-01 04:41:32 +00:00
Tom Lane 970ef45c41 Re-enable pg_upgrade, after adding checks that the source
and target databases are of versions it knows about.
1999-07-31 22:06:44 +00:00
Tom Lane cf835f97fc Add comments for attdisbursion field --- NO code change. 1999-07-31 19:07:25 +00:00
Tom Lane 30da344cb1 Update comments about clause selectivity estimation. 1999-07-30 22:34:19 +00:00
Bruce Momjian 44763a2b23 Make usecatupd disabled for normal users, and allow normal users to
update temp tables with this setting.
1999-07-30 18:09:49 +00:00
Tom Lane 04578a9180 Further cleanups of indexqual processing: simplify control
logic in indxpath.c, avoid generation of redundant indexscan paths for the
same relation and index.
1999-07-30 04:07:25 +00:00
Marc G. Fournier f08baacfa5 just testing a script... 1999-07-30 03:45:57 +00:00
Bruce Momjian fca190e102 Remove extra #endif 1999-07-30 03:45:44 +00:00
Marc G. Fournier 5fb84df9b1 Nothing changed, just testing cvslog ... 1999-07-30 03:42:59 +00:00
Tom Lane 7d572886d6 Fix coredump seen when doing mergejoin between indexed tables,
for example in the regression test database, try
select * from tenk1 t1, tenk1 t2 where t1.unique1 = t2.unique2;
6.5 has this same bug ...
1999-07-30 00:56:17 +00:00
Tom Lane 161be69544 Update comments for create_indexscan_node(). 1999-07-30 00:44:23 +00:00
Bruce Momjian 12c51d9c6e Remove comment after optimization flag. 1999-07-29 15:39:05 +00:00
Tom Lane ecbfafbe0e Add support for Case exprs to fix_indxqual_references,
so that Case works in WHERE join clauses.  Temporary patch --- this routine
is one of many that ought to be changed to use centralized expression-tree-
walking logic.
1999-07-29 02:48:05 +00:00
Tom Lane 6b157f376a Add equal() funcs for Case nodes ... amazing we had not
detected this omission before.  Miscellaneous other cleanups.
1999-07-29 02:45:36 +00:00
Tom Lane 9682e8081b Allow a_expr not just AexprConst in the right-hand list of
IN and NOT IN operators.  Rewrite grotty implementation of IN-list
parsing ... look Ma, no global variable ...
1999-07-28 17:39:38 +00:00
Tom Lane b62fdc13f0 Correct bug in best_innerjoin(): it should check all the
rels that the inner path needs to join to, but it was only checking for
the first one.  Failure could only have been observed with an OR-clause
that mentions 3 or more tables, and then only if the bogus path was
actually selected as cheapest ...
1999-07-27 06:23:12 +00:00
Tom Lane 2f30d5a34a My recent optimizer changes caused a different plan to
be picked for one of the complex joins in rules test ... leading to
a different output ordering ...
1999-07-27 03:53:54 +00:00
Tom Lane 9e7e29e6c9 First cut at doing LIKE/regex indexing optimization in
optimizer rather than parser.  This has many advantages, such as not
getting fooled by chance uses of operator names ~ and ~~ (the operators
are identified by OID now), and not creating useless comparison operations
in contexts where the comparisons will not actually be used as indexquals.
The new code also recognizes exact-match LIKE and regex patterns, and
produces an = indexqual instead of >= and <=.

This change does NOT fix the problem with non-ASCII locales: the code
still doesn't know how to generate an upper bound indexqual for non-ASCII
collation order.  But it's no worse than before, just the same deficiency
in a different place...

Also, dike out loc_restrictinfo fields in Plan nodes.  These were doing
nothing useful in the absence of 'expensive functions' optimization,
and they took a considerable amount of processing to fill in.
1999-07-27 03:51:11 +00:00
Tom Lane 49ed4dd779 Further work on planning of indexscans. Cleaned up interfaces
to index_selectivity so that it can be handed an indexqual clause list
rather than a bunch of assorted derivative data.
1999-07-25 23:07:26 +00:00
Tom Lane 8ae29a1d40 Remove 'restrictinfojoinid' field from RestrictInfo nodes.
The only place it was being used was as temporary storage in indxpath.c,
and the logic was wrong: the same restrictinfo node could get chosen to
carry the info for two different joins.  Right fix is to return a second
list of unjoined-relids parallel to the list of clause groups.
1999-07-25 17:53:27 +00:00
Tom Lane ac4913a0dd Clean up messy clause-selectivity code in clausesel.c; repair bug
identified by Hiroshi (incorrect cost attributed to OR clauses
after multiple passes through set_rest_selec()).  I think the code
was trying to allow selectivities of OR subclauses to be passed in
from outside, but noplace was actually passing any useful data, and
set_rest_selec() was passing wrong data.

Restructure representation of "indexqual" in IndexPath nodes so that
it is the same as for indxqual in completed IndexScan nodes: namely,
a toplevel list with an entry for each pass of the index scan, having
sublists that are implicitly-ANDed index qual conditions for that pass.
You don't want to know what the old representation was :-(

Improve documentation of OR-clause indexscan functions.

Remove useless 'notclause' field from RestrictInfo nodes.  (This might
force an initdb for anyone who has stored rules containing RestrictInfos,
but I do not think that RestrictInfo ever appears in completed plans.)
1999-07-24 23:21:14 +00:00
Tom Lane 348bdbce79 Minor code beautification, extensive improvement of
comments.  This file was full of obsolete and just plain wrong
commentary...
1999-07-23 03:34:49 +00:00
Tom Lane baac6f981e Exit cleanups I made yesterday caused pq_close() to be
invoked during exit from a standalone backend, leading to core dump.
This is the cause of the recently reported initdb-time crash :-(.
Sorry folks...
1999-07-23 03:00:10 +00:00
Bruce Momjian 66f66343f6 Alpha spinlock fix from Uncle George <gatgul@voicenet.com> 1999-07-22 18:30:08 +00:00
Tom Lane 2aa64f79f5 Plug several holes in backend's ability to cope with
unexpected loss of connection to frontend.
1999-07-22 02:40:07 +00:00
Bruce Momjian f96babac12 While I was running some tests in psql, trying to figure out how to change
the query string to handle any length, I discovered that under certain
conditions, psql will core dump when handling long strings.  Thus, the
patch.  It was caused by a buffer overrun, probably not noticeable in a lot
of cases, but pretty noticeable in mine.

Problem was caused by the fact that the length check is only performed after
the check for a ; to get the end of the query and execute.

Cheers...

MikeA
1999-07-20 17:20:43 +00:00
Bruce Momjian c175de56dc Reverse out cache changes that are not ready yet. 1999-07-20 17:14:08 +00:00
Bruce Momjian 7944d501f4 Use -ieee alpha flag for gcc and egcs only. 1999-07-20 16:48:58 +00:00
Bruce Momjian 41b60ba7ad autoconf 1999-07-20 02:45:44 +00:00
Bruce Momjian 93fbd46ba5 Re-add Makefile. 1999-07-20 02:44:09 +00:00
Bruce Momjian e740c9b1d1 Move -ieee to adt Makefile, and add CPU Makefile variable. 1999-07-20 02:42:20 +00:00
Tom Lane 2908bd535f Complain about INSERT ... SELECT ... ORDER BY, which we do not
support, but which the grammar was accepting.  Also, fix several bugs
having to do with failure to copy fields up from a subselect to a select
or insert node.
1999-07-20 00:18:01 +00:00
Bruce Momjian d6ce220f04 psql fix. 1999-07-19 21:06:19 +00:00
Bruce Momjian e2f32054f4 linux/sparc cleanup 1999-07-19 18:19:40 +00:00
Bruce Momjian b653d1e263 Fix for linux/sparc. 1999-07-19 18:07:36 +00:00
Bruce Momjian 50644a2202 Cleanup of patch just applied. 1999-07-19 16:49:17 +00:00
Bruce Momjian 2b8c9e793d Set the application name, used for parsing readline's .inputrc -- dz
Massimo
1999-07-19 16:46:53 +00:00
Bruce Momjian be1851902a Fix #if if. 1999-07-19 14:30:52 +00:00
Michael Meskes 9f0ffa2241 *** empty log message *** 1999-07-19 12:37:48 +00:00
Bruce Momjian faf7d78174 Install new alignment code to use MAXALIGN rather than DOUBLEALIGN where
approproate.
1999-07-19 07:07:29 +00:00
Bruce Momjian e259780b13 Enable WIN32 compilation of libpq. 1999-07-19 06:25:40 +00:00
Bruce Momjian bf98a4656b Win32 cleanup 1999-07-19 02:45:43 +00:00
Bruce Momjian 9da390d348 autoconf 1999-07-19 02:32:55 +00:00
Bruce Momjian e44c931801 Re-add getopt.h check, remove NT-specific tests for it. 1999-07-19 02:27:16 +00:00
Tom Lane 677028177e Clean up gcc warning about unused static decl. 1999-07-19 02:06:15 +00:00
Bruce Momjian 435ed7aaa1 autoconf 1999-07-19 01:20:00 +00:00
Bruce Momjian c9acd2da12 Remove getopt configure check. 1999-07-19 01:18:05 +00:00
Tom Lane 44bc7ab2a6 Put back mistakenly removed configure test for HAVE_NETINET_IN_H. 1999-07-19 00:55:59 +00:00
Tom Lane 0c4929ff86 Parser no longer considers
SELECT a/2, a/2 FROM test_missing_target GROUP BY a/2;
to be ambiguous ... which I think is correct behavior.
1999-07-19 00:29:07 +00:00
Tom Lane 7f76eab140 Rewrite parser's handling of INSERT ... SELECT so that processing
of the SELECT part of the statement is just like a plain SELECT.  All
INSERT-specific processing happens after the SELECT parsing is done.
This eliminates many problems, e.g. INSERT ... SELECT ... GROUP BY using
the wrong column labels.  Ensure that DEFAULT clauses are coerced to
the target column type, whether or not stored clause produces the right
type.  Substantial cleanup of parser's array support.
1999-07-19 00:26:20 +00:00
Bruce Momjian c981442772 Update ecpg compile. 1999-07-18 21:07:02 +00:00
Bruce Momjian b9b5f5d6ca autoconf 1999-07-18 21:05:17 +00:00
Bruce Momjian cb08547646 Add getopt test. 1999-07-18 21:02:56 +00:00
Bruce Momjian 0b976ec1d8 autoconf 1999-07-18 20:46:25 +00:00
Bruce Momjian 2798162038 cleanup 1999-07-18 20:43:33 +00:00
Bruce Momjian 7badb1e792 Fix configure problem. 1999-07-18 20:43:13 +00:00
Bruce Momjian b721c9e164 autoconf 1999-07-18 20:13:40 +00:00
Tom Lane fea7ab5298 Fix typo in _outArrayRef(). 1999-07-18 19:02:49 +00:00
Bruce Momjian d6f26e6451 Update for 6.6. 1999-07-18 18:06:42 +00:00
Bruce Momjian a927d6ea4e configure cleanup 1999-07-18 18:03:50 +00:00
Bruce Momjian d0634aca39 configure cleanup 1999-07-18 17:38:25 +00:00
Bruce Momjian ef9699d6da autoconf 1999-07-18 16:44:31 +00:00
Bruce Momjian 07262a2dfb Update configure include checks. 1999-07-18 16:42:16 +00:00
Bruce Momjian 0858b06f16 autoconf 1999-07-18 14:54:46 +00:00
Bruce Momjian 46355e94d4 Update includes from configure 1999-07-18 14:48:30 +00:00
Bruce Momjian 9c30bba810 autoconf 1999-07-18 14:38:47 +00:00
Bruce Momjian 1c0c607110 No check for string/strings.h. 1999-07-18 14:34:38 +00:00
Tom Lane 32664b4b4b Improve commentary about ArrayRef and ResTarget nodes. 1999-07-18 03:45:01 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Tom Lane c62b8a68bf Fix incorrect declaration of rtentry as 'ResTarget' where it
should be 'RangeTblEntry' ; explain.c had copied the erroneous code.
1999-07-17 19:01:21 +00:00
Bruce Momjian 33e826d167 Fix for multi-byte includes. 1999-07-17 16:25:28 +00:00
Tom Lane df454bd864 Fix silly typo in commentary... 1999-07-17 16:02:50 +00:00
Bruce Momjian 0e264fb464 Add c.h to exclusion list. 1999-07-17 15:37:30 +00:00
Bruce Momjian 9b4dac7f12 clean up comment on missing file. 1999-07-17 05:16:15 +00:00
Bruce Momjian 2d36471b82 Include check 1999-07-17 04:25:33 +00:00
Bruce Momjian 8f5561a0d9 More config.h cleanups. 1999-07-17 04:12:10 +00:00
Bruce Momjian fbe4ad2154 Add config.h as needed. 1999-07-17 04:00:31 +00:00
Tom Lane 8ee07b506d Tired of seeing that 'unused variable' warning... 1999-07-16 23:15:46 +00:00
Tom Lane 05933f4ec1 Add back improperly removed #include for utils/trace.h. 1999-07-16 23:12:39 +00:00
Tom Lane e1e110228f Add back improperly removed #include for config.h.
This probably ought to be kept in *all* the port files, but these two
are the only ones that generated compiler warnings for me ...
1999-07-16 23:09:45 +00:00
Tom Lane 1a6c5b96ad Add back improperly removed #include for utils/dynamic_loader.h. 1999-07-16 23:05:45 +00:00
Tom Lane 8753b23c8c Fix 'SO__MINOR_VERSION' typo for irix5; add AIX shlib support
from Andreas Z.; minor cosmetic cleanups.
1999-07-16 22:56:01 +00:00
Tom Lane 36ce6d439f Support subscripts on bare column names. 1999-07-16 22:32:25 +00:00
Tom Lane f9e2c7fae8 Allow bare column names to be subscripted as arrays. This
creates a reduce/reduce conflict, which I resolved by changing the
'AexprConst -> Typename Sconst' rule to 'AexprConst -> SimpleTypename Sconst'.
In other words, a subscripted type declaration can't be used in that
syntax any longer.  This seems a small price to pay for not having to
qualify subscripted columns anymore.
Other cleanups: rename res_target_list to update_target_list, and remove
productions for variants that are not legal in an UPDATE target list;
rename res_target_list2 to plain target_list; delete position_expr
in favor of using b_expr in that production; merge opt_indirection
into attr nonterminal, since there are no places where an unsubscripted
attr is wanted; fix typos in Param support; change case_arg so that
an arbitrary a_expr is allowed, not only a column name.
1999-07-16 22:29:42 +00:00
Tom Lane bc9236bc01 Revise _bt_binsrch() so that its binary search loop takes
care of equal-key cases, eliminating bt_firsteq().  The linear search
formerly done by bt_firsteq() took a lot of time in the case where many
equal keys appear on the same page.
1999-07-16 22:17:06 +00:00
Bruce Momjian 9679cb3910 More cleanup 1999-07-16 17:46:32 +00:00
Bruce Momjian 773088809d More cleanup 1999-07-16 17:07:40 +00:00
Bruce Momjian 7d5b08dec0 More cleanup 1999-07-16 05:41:19 +00:00
Bruce Momjian 69817665cb Final cleanup 1999-07-16 05:23:30 +00:00
Bruce Momjian a71802e12e Final cleanup. 1999-07-16 05:00:38 +00:00
Bruce Momjian 9b645d481c Update #include cleanups 1999-07-16 03:14:30 +00:00
Bruce Momjian a9591ce66a Change #include's to use <> and "" as appropriate. 1999-07-15 23:04:24 +00:00
Bruce Momjian 2e6b1e63a3 Remove unused #includes in *.c files. 1999-07-15 22:40:16 +00:00
Bruce Momjian 40a89e08b2 Cleanups. 1999-07-15 20:32:30 +00:00
Bruce Momjian fb38a5d8cf Remove un-needed #include's from *.c files. 1999-07-15 19:21:43 +00:00
Bruce Momjian 353eb3dadf Add updates. 1999-07-15 16:55:32 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
Tom Lane 390e8354ce Add SHLIB_LINK setting for solaris_i386 and solaris_sparc ports,
per bug report from Daren Sefcik <daren@partnersdata.com>.
1999-07-15 02:03:00 +00:00
Tom Lane 8aea617c03 Several routines failed to cope with CASE expressions, and
indeed some of 'em were missing support for more node types than that...
1999-07-15 01:52:09 +00:00
Bruce Momjian 0cf1b79528 Cleanup of /include #include's, for 6.6 only. 1999-07-14 01:20:30 +00:00
Bruce Momjian ad4948862c Remove S*I comments from Stephan. 1999-07-13 21:17:45 +00:00
Bruce Momjian 050371fccd More cpu cleanups, only for 6.6. 1999-07-13 20:12:51 +00:00
Bruce Momjian 540c114225 Redefine cpu's as __cpu__. Only for 6.6 branch. 1999-07-13 20:00:37 +00:00
Bruce Momjian 30e27a9099 readd include for safety. 1999-07-12 13:32:38 +00:00
Tatsuo Ishii 8f02f2252d Fix some compiler warnings (Tomoaki Nishiyama), add WIN1250 support (Pavel Behal) 1999-07-11 22:47:21 +00:00
Tom Lane eeaeb1bda8 RewritePreprocessQuery tried to match resjunk targets against
result relation ... wrong ...
1999-07-11 17:54:30 +00:00
Tom Lane eeb3abe017 Ignore resjunk targetlist entries when matching arguments to
a SubLink with the subplan's targetlist.  This fixes a problem seen with,
for example, a subselect that uses GROUP BY.
1999-07-11 02:04:19 +00:00
Tom Lane 9cbd349bcd ExecReScanGroup() forgot to clear grpstate->grp_firstTuple,
thereby guaranteeing wrong results from a rescanned Group node.
1999-07-11 01:57:32 +00:00
Tom Lane ebc3cc7efa heapam.h uses type time_t, but didn't include <time.h>. 1999-07-10 22:06:26 +00:00
Tom Lane cc62dc2032 Fix tuplecmp() to ensure repeatable sort ordering of tuples
that contain null fields.  Old code would produce erratic sort results
because comparisons of tuples containing nulls could produce inconsistent
answers.
1999-07-10 18:21:59 +00:00
Bruce Momjian d62c25d452 cleanup of long long int atoi test. 1999-07-10 17:03:34 +00:00
Bruce Momjian 5a3fa95c39 Update stuff for 6.5.1 release. 1999-07-10 16:28:02 +00:00
Tatsuo Ishii 4fceee0e71 -mieee and # does not work for certain version of egcs 1999-07-10 12:33:10 +00:00
Tom Lane 73efd3867d Fix gcc complaint about long being passed to sprintf %d. 1999-07-09 22:53:40 +00:00
Bruce Momjian 863db45e86 Make ^ precidence greater than *. 1999-07-09 21:59:59 +00:00
Bruce Momjian cda192317a createlang now returns 2 for language already exists. 1999-07-09 17:57:46 +00:00
Bruce Momjian 103cf75651 Re-apply range check patch after fixing LIMIT_H test and defines. 1999-07-09 17:40:31 +00:00
Bruce Momjian cd5dfb65a9 Add mention block size <= 32k. 1999-07-09 16:56:44 +00:00
Tom Lane b9c0096d97 Another place that HAVE_LIMITS_H was misspelled. 1999-07-09 15:09:54 +00:00
Bruce Momjian 8aa780bdd3 cleanup 1999-07-09 04:51:27 +00:00
Bruce Momjian 296efd8065 Fix for ACL length problem on different platforms. 1999-07-09 03:28:53 +00:00
Bruce Momjian 46db8ac712 Backup pg_atoi patch for long checking. Caused initdb problems. 1999-07-09 03:27:20 +00:00
Bruce Momjian ffe0097519 Add linux_m68k template file. 1999-07-09 02:35:37 +00:00
Bruce Momjian 27ef825743 Rename tuturials for char2/char16 removal. 1999-07-08 15:28:51 +00:00
Bruce Momjian 1a7273bd5c Rename example temp to mytemp. 1999-07-08 15:27:01 +00:00
Bruce Momjian 3acb7d1634 Test Case:
----------
exec sql begin declare section;
   short s ;
   unsigned short us;
exec sql end   declare section;
exec sql create table test(s smallint, us smallint);
exec sql commit;
s = 1; us =32000;
exec sql insert into test values( :s, :us ) ;  <== error

Error Message: "i4toi2: '-600309759' causes int2 underflow"

Masaaki Sakaida
1999-07-08 03:32:57 +00:00
Bruce Momjian 0343024a5c Add CXXFLAGS += 1999-07-08 03:30:16 +00:00
Bruce Momjian 2cf2a4fe2b > In both datetime_trunc() and timespan_trunc() in dt.c,
> the DTK_MICROSEC case is just like the DTK_MILLISEC case.
> I think this is wrong and it ought to look like
>         fsec = rint(fsec * 1000000) / 1000000;
> no?

Tom Lane.
1999-07-08 03:22:46 +00:00
Bruce Momjian 70ce98b77a Rename pg_temp to pg_sorttemp so it does not conflict with temp table names. 1999-07-08 02:46:39 +00:00
Bruce Momjian 5035d7b985 pg_atoi() does range check on int4 data only if
"HAS_LONG_LONG" is defined based on the assumption that
strtol() would return ERANGE if a platform does not support
64-bit integers. In current PostgreSQL 6.5 (and 6.4.2)
distribution, "HAS_LONG_LONG" is defined only if platform
is "alpha". (See include/port/alpha.h) I think the int4
range check should apply to linux_alpha as well. (I have
not tested yet but I guess this might be applicable to
newer Linux/i386 distributions which includes new GCC which
implements long int as 64-bit int.)
1999-07-08 00:27:01 +00:00
Bruce Momjian a6c688d9cd Irix update from Mark Dalphin 1999-07-08 00:15:03 +00:00
Bruce Momjian 104d6c816e Add ^ precidence. 1999-07-08 00:00:43 +00:00
Bruce Momjian 38ff52c379 Allow port numbers 32k - 64k. 1999-07-07 17:17:50 +00:00
Bruce Momjian db15dc05ad Fix for \do and ceil()/float. 1999-07-07 16:09:33 +00:00
Bruce Momjian e9c977da7d Fix spelling of variable name. 1999-07-07 09:36:45 +00:00
Bruce Momjian 9f7ac20e57 Cleanup of min tuple size. 1999-07-07 09:27:28 +00:00
Bruce Momjian 1391098851 Fix misspelling. 1999-07-07 09:11:15 +00:00
Bruce Momjian 5babe7db45 Remove old readme file. 1999-07-05 21:48:21 +00:00
Bruce Momjian 137eacbe6a Align cleanup. 1999-07-04 05:47:06 +00:00
Bruce Momjian a0b4af3c85 More alignment 1999-07-04 05:44:56 +00:00
Bruce Momjian ede5a41829 Clean up maximum rewrite tuple length. 1999-07-04 05:16:05 +00:00
Bruce Momjian eba41848aa Clarify maximum tuple and max attribute lengths. 1999-07-04 04:56:02 +00:00
Tom Lane b31aa64f4a Make exec_simple_check_plan() check for a null plan, so
that it doesn't crash when processing a utility statement.
1999-07-04 01:03:01 +00:00
Bruce Momjian efb621278e Add abortcurrent trans to temp table fix. 1999-07-03 15:43:57 +00:00
Bruce Momjian ff8756dd1c More cleanup 1999-07-03 01:57:53 +00:00
Bruce Momjian b1444b0934 Update tuple size check. 1999-07-03 01:56:16 +00:00
Bruce Momjian 8dd3407bf5 Fix for insertion of tuple too large. 1999-07-03 01:47:02 +00:00
Bruce Momjian 97dfff832c Fix to prevent too large tuple from being created. 1999-07-03 00:33:04 +00:00
Bruce Momjian 954e466c27 Fix for removal of temp tables if last transaction was aborted. 1999-07-02 18:09:28 +00:00
Bruce Momjian d20abcd8c5 typo fix. 1999-07-02 03:21:37 +00:00
Bruce Momjian c9a0a232e2 #ifdef around true and false. 1999-07-01 19:47:25 +00:00
Tom Lane 0aa544eb41 make distclean missed a few symlinks created by configure. 1999-07-01 00:06:28 +00:00