Commit Graph

987 Commits

Author SHA1 Message Date
Bruce Momjian c10e6bcbed Attempting to insert a value of 'now' into a datetime type
results in a bogus datetime value under AlphaLinux.  (Note that
the link to submit a port-specific bug on your website is broken)

-Test Case:
----------
testdb=> create table dttest (dt datetime);
testdb=> insert into dttest values ('now');

--------------------------------------------------------------------------


Solution:
---------
The basic problem is the typedefs of AbsoluteTime and RelativeTime,
which are both 'int32'.  These types appear to be used synonymously
with the 'time_t' type, which on AlphaLinux is typedef'd as a 'long
int', which is 64-bits (not 32).  The solution included here fixes
the datetime type (it now passes the regression test), but does not
pass the absolute and relative time regression tests.  Presumably, a
more thorough investigation of how these types are used is warranted.
The included patch is from the v6.3.2 source, but can be applied to
the v6.4.2 source.  Please note that there is also a RedHat-specific
patch distributed with the PostgreSQL source package from RedHat
that was applied first.

Rich Edwards
1999-03-14 16:44:02 +00:00
Bruce Momjian 042ec823cf Cleanup of hash functions in pg_proc. 1999-03-14 16:32:46 +00:00
Bruce Momjian aba8c12f67 We have tested the patches on three platforms:
NetBSD/macppc
LinuxPPC
FreeBSD 2.2.6-RELEASE

All of them seem happy with the regression test. Note that, however,
compiling with optimization enabled on NetBSD/macppc causes an initdb
failure (other two platforms are ok). After checking the asm code, we
are suspecting that might be a compiler(egcs) bug.

Tatsuo Ishii
1999-03-14 16:03:33 +00:00
Bruce Momjian 817a3e6d39 Enclosed below I have a patch to allow a btree index on the int8 type.
I would like some feedback on what the hash function for the int8 hash
function
in the ./backend/access/hash/hashfunc.c should return.

Also, could someone (maybe Tomas Lockhart?) look-over the patch and make
sure
the system table entries are correct?  I've tried to research them as
much as I
could, but some of them are still not clear to me.

Thanks,
-Ryan
1999-03-14 05:09:05 +00:00
Tom Lane f8f0efb43d Make type 'regproc' binary-compatible with int4 and oid,
so that it has some SQL operators available.  It's difficult to write
automated tests of a data type that you haven't even got == for...
1999-03-10 05:05:58 +00:00
Tom Lane 3bca9c6c4b Fix some typos in argument and result types in pg_proc
and pg_operator.  The lone error in pg_operator was reported as a bug
by Michael Reifenberger; the multiple errors in pg_proc would only have
been noticed if one invoked the functions by name rather than using
operator syntax.  I guess few people do that.
1999-03-10 05:02:34 +00:00
Marc G. Fournier f34240de06 Changes to fix/improve the dynamic loading on NT
From: Horak Daniel <horak@mmp.plzen-city.cz>
1999-03-09 13:39:15 +00:00
Marc G. Fournier 75007a72d6 Have configure check for use of %lld for int64, and if that fails, check for
use of %qd...a more generic solution then having #ifdef __<INSERT OS HERE>__
in the code...
1999-03-08 04:17:33 +00:00
Tom Lane 86c2eadb18 Modify mcxt.h so that it doesn't pull in half of creation. 1999-03-07 23:03:32 +00:00
Bruce Momjian a564d2bf0f geqo now at 11 tables 1999-03-07 12:00:40 +00:00
Bruce Momjian 60bb92af33 Really remove Recipe. 1999-03-07 03:34:11 +00:00
Tom Lane 6c51355612 Eliminate duplicated code in dt.h 1999-03-06 22:58:11 +00:00
Tom Lane 731603a92b A few further tweaks to shared memory space estimation.
This change brings the default size of the main shmem block back under 1MB,
which is a fairly popular value for the kernel's SHMMAX parameter.
1999-03-06 21:17:56 +00:00
Tom Lane e0345e09bf Partial fix for copied-plan bugs reported by Hiroshi Inoue:
_copyResult didn't copy subPlan structure completely.  _copyAgg is still
busted, apparently because of changes from EXCEPT/INTERSECT patch
(get_agg_tlist_references is no longer sufficient to find all aggregates).
No time to look at that tonight, however.
1999-03-03 00:02:42 +00:00
Tom Lane b204d10c79 Executor no longer cares about mergejoinop, mergerightorder, mergeleftorder,
so remove them from MergeJoin node.  Hack together a partial
solution for commuted mergejoin operators --- yesterday
a mergejoin int4 = int8 would crash if the planner decided to
commute it, today it works.  The planner's representation of
mergejoins really needs a rewrite though.
Also, further testing of mergejoin ops in opr_sanity regress test.
1999-03-01 00:10:44 +00:00
Tom Lane 51f0f6ddc8 Fix pg_operator entries for mergejoinable operators with different left and
right side data types.  Correct the opr_sanity regress test to check these
entries properly.  NOTE that opr_sanity will now fail until you do an initdb!
1999-02-28 00:56:42 +00:00
Tom Lane dc77be0432 Fix executor to work correctly with mergejoins where left and
right sides have different data types.
1999-02-28 00:36:05 +00:00
Tom Lane 1e006ba2ad Put back T_RecipeStmt, since the system doesn't actually build
without it.  Sloppy, sloppy.
1999-02-27 21:40:39 +00:00
Bruce Momjian 6df955fd3b Fix problem with selectivity error in added columns with ALTER TABLE.
Move files to deadcode.
1999-02-24 17:29:06 +00:00
Thomas G. Lockhart e17d8448f2 Add parameters to function calls to pass back table qualifications. 1999-02-23 08:05:27 +00:00
Thomas G. Lockhart 0a8e9c4e7f Define JoinExpr structure for outer join syntax.
Clean up comments in execnodes.h.
1999-02-23 07:55:24 +00:00
Thomas G. Lockhart 8f0a76f012 Bring debugging print statement declarations up to date.
Comment-out the #undef default declarations to allow the parameters to be
 set on the compiler command line.
1999-02-23 07:39:40 +00:00
Thomas G. Lockhart 889c1530c9 Add constants for outer join states in executor. 1999-02-23 07:37:31 +00:00
Thomas G. Lockhart 25cccc05aa Fix typos in comments. 1999-02-23 07:36:31 +00:00
Bruce Momjian 1e70c1fe5d comments cleanup. 1999-02-22 19:55:44 +00:00
Tom Lane bcfdc9df04 Repair some pretty serious problems in dynahash.c and
shared memory space allocation.  It's a wonder we have not seen bug
reports traceable to this area ... it's quite clear that the routine
dir_realloc() has never worked correctly, for example.
1999-02-22 06:16:57 +00:00
Bruce Momjian 1ed5cbbfd8 Final optimizer cleanups. 1999-02-22 05:26:58 +00:00
Marc G. Fournier 8c3e8a8a0e From: Tatsuo Ishii <t-ishii@sra.co.jp>
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
1999-02-21 03:49:55 +00:00
Bruce Momjian 23c30246d7 pathkeys.c cleanup. 1999-02-21 01:55:03 +00:00
Tom Lane 9d197856dd Rearrange handling of MAXBACKENDS a little bit. The default setting
of MAXBACKENDS is now 1024, since all it's costing is about 32 bytes of memory
per array slot.  configure's --with-maxbackends switch now controls DEF_MAXBACKENDS
which is simply the default value of the postmaster's -N switch.  Thus,
the out-of-the-box configuration will still limit you to 64 backends,
but you can go up to 1024 backends simply by restarting the postmaster with
a different -N switch --- no rebuild required.
1999-02-21 01:41:55 +00:00
Bruce Momjian 75cccd0ad3 pathkeys fixes 1999-02-20 19:02:43 +00:00
Bruce Momjian 9188aab758 add pathkeys description. 1999-02-20 16:28:20 +00:00
Tom Lane 4c31393135 Reorder startup ops so that if preallocation of semas fails,
postmaster will release whatever it did get before dying.
1999-02-19 07:10:48 +00:00
Tom Lane e77b630cf0 Allow maximum number of backends to be set at configure time
(--with-maxbackends).  Add a postmaster switch (-N backends) that allows
the limit to be reduced at postmaster start time.  (You can't increase it,
sorry to say, because there are still some fixed-size arrays.)
Grab the number of semaphores indicated by min(MAXBACKENDS, -N) at
postmaster startup, so that this particular form of bogus configuration
is exposed immediately rather than under heavy load.
1999-02-19 06:06:39 +00:00
Bruce Momjian 612b8434e4 optimizer cleanup 1999-02-19 05:18:06 +00:00
Bruce Momjian 8ab72a38df optimizer cleanup 1999-02-19 02:05:20 +00:00
Bruce Momjian 65ccd1039a Enable bushy plans by default. 1999-02-18 05:26:34 +00:00
Bruce Momjian e78662d879 optimizer cleanup 1999-02-18 04:55:54 +00:00
Bruce Momjian d977ff7b52 more optimizer cleanups 1999-02-18 04:45:36 +00:00
Bruce Momjian 31cce21fb0 Fix bushy plans. Cleanup. 1999-02-18 00:49:48 +00:00
Bruce Momjian c82ca4c158 Re-enable bushy plans. Vadim want them. 1999-02-16 00:41:03 +00:00
Bruce Momjian e6bf7b4d93 rename 1999-02-15 05:56:07 +00:00
Bruce Momjian 56bb23a8fe optimizer rename 1999-02-15 05:50:02 +00:00
Bruce Momjian 50034a852d optimizer rename 1999-02-15 05:28:10 +00:00
Bruce Momjian c5449d5354 otherrels is now unjoined_rels 1999-02-15 05:21:12 +00:00
Bruce Momjian 82682ff31f optimizer rename 1999-02-15 03:59:28 +00:00
Bruce Momjian ba2883b264 Remove duplicate geqo functions, and more optimizer cleanup 1999-02-15 03:22:37 +00:00
Bruce Momjian 61aa825876 Optimizer rename. 1999-02-14 04:57:02 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Thomas G. Lockhart ba71b81966 Remove equivalence between datetime and float8. Led to nothin' but trouble. 1999-02-13 05:25:54 +00:00