Commit Graph

2283 Commits

Author SHA1 Message Date
Bruce Momjian
bd6f98af31 I suggest the following portability patch, which does not
change functionality, but makes the code more ANSI C'ish.
My AIX xlc compiler barfs on all of these. Can someone please
review and apply to current.

 <<port.patch>>
Thanks
Andreas
1999-03-19 18:56:43 +00:00
Bruce Momjian
58cc2b6ead cleanup parser 1999-03-18 22:11:47 +00:00
Bruce Momjian
5dd9b58a86 grammar cleanup' 1999-03-18 22:03:59 +00:00
Bruce Momjian
ddd50c440a cleanup of grammer. 1999-03-18 22:01:56 +00:00
Bruce Momjian
30ad427388 Fix optimizer indexing not working for negative numbers. 1999-03-18 21:39:56 +00:00
Bruce Momjian
dc02fd709f cleanups 1999-03-18 19:59:55 +00:00
Bruce Momjian
58118db39d Add new postgres -O option to allow system table structure changes. 1999-03-17 22:53:31 +00:00
Bruce Momjian
4989feaf3d Left associates all operators, instead of non-associating them. 1999-03-17 21:02:57 +00:00
Bruce Momjian
3b43accb0f Have % operator have precedence like /. 1999-03-17 20:17:13 +00:00
Bruce Momjian
bfcf90600b Update nextval() code. 1999-03-16 20:15:06 +00:00
Bruce Momjian
89b762e509 Fix snprintf with strings, and nextval('"Aa"'); 1999-03-16 04:26:01 +00:00
Bruce Momjian
434762b559 Here is a patch.
I have changed to call pg_exec_query_dest() instead of pg_exec_query().

Thanks.

Hiroshi Inoue
1999-03-16 03:24:18 +00:00
Bruce Momjian
3a03e3cd30 cleanup 1999-03-15 22:20:20 +00:00
Bruce Momjian
4b583a8a56 Allow sequence nextval actions to be case-sensitive. 1999-03-15 16:48:34 +00:00
Bruce Momjian
1a305b7ad5 Drop buffers before destroying database files. 1999-03-15 14:07:44 +00:00
Bruce Momjian
25541a5cd3 LIKE cleanup. 1999-03-15 13:45:09 +00:00
Tom Lane
4a9c239063 Fix brain death in !!= operator ... it's still pretty bogus
but at least now it does what it's supposed to do ...
1999-03-15 03:24:32 +00:00
Bruce Momjian
265c283e1b > > > This patches src/bin/psql/psql.c.
> > >
> > > This patch is in responce to the following TODO list item:
> > >  * have psql \d on a view show the query
> > > -Ryan
1999-03-15 02:18:37 +00:00
Bruce Momjian
db42533eae cleanup 1999-03-14 20:17:20 +00:00
Bruce Momjian
5d34abc6f1 Cleanup 1999-03-14 20:01:14 +00:00
Bruce Momjian
8930699cd6 src/backend/utils/adt/numeric.c fails to compile due to a string having
an
embedded new-line character.


Billy G. Allie
1999-03-14 16:49:32 +00:00
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
80db587e7b Here is a little syntax error found in a .y file... A dropped semi.
DwD
--
Daryl W. Dunbar
1999-03-14 16:40:18 +00:00
Bruce Momjian
042ec823cf Cleanup of hash functions in pg_proc. 1999-03-14 16:32:46 +00:00
Bruce Momjian
1d3166d3fa compile cleanup 1999-03-14 16:27:59 +00:00
Bruce Momjian
f1cdcffb05 Compile cleanup 1999-03-14 16:25:07 +00:00
Bruce Momjian
4c9392230a Done.
o overwriting an existing lobj now works
o 8KB garbage block always inserted problem is fixed

Tatsuo Ishii
1999-03-14 16:08:17 +00:00
Bruce Momjian
9cab13c42e I've been having also sorts of fun trying to get kerberos 4
authentifica
tion
working with postgresql-6.4.2 and  KTH-KRB Ebones
(http://www.pdc.kth.se/kth-kr
b) on a dec alpha running DU 4.0D using the native compiler. The
following
patch does the trick.

The rationale behind this is as follows. The KTH-KRB code header files
defines
lots of lengths like INST_SZ,REALM_SZ and KRB_SENDAUTH_VLEN. It also has
a
habit of doing things like

        chararray[LENGTH] = '\0'

to ensure null terminated strings. In my instance this just happens to
blat
the kerberos principal instance string leading to error like

        pg_krb4_recvauth: kerberos error: Can't decode authenticator
(krb_rd_req
)

The application code that comes with KTH-KRB uses "KRB_SENDAUTH_VLEN +
1" and
sometimes uses "INST_SZ + 1" so it seems safest to put that 1 char
buffer in
the appropriate place.


Rodney McDuff
1999-03-14 16:06:43 +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
f6a9ed0445 Hello,
I've been working on the following TODO list item:
  * psql \d on index with char()/varchar() fields shows improper length

I've attached a simple patch to fix this.

-Ryan
1999-03-14 05:23:12 +00:00
Bruce Momjian
d13fe29000 I have a problem with Access97 not working properly when entering new
records using a sub form, i.e. entering a new order/orderlines or master
and
detail tables.  The problem is caused by a SQL statement that Access97
makes
involving NULL.  The syntax that fails is "column_name" = NULL.  The
following attachment was provided by -Jose'-.  It contains a very small
enhancement to gram.y that will allow Access97 to work properly with sub
forms.  Can this enhancement be added to release 6.5?

 <<gram.patch>>
Thanks, Michael
1999-03-14 05:15:08 +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
Vadim B. Mikheev
2a76aa23e0 We have to return dummy tuple for empty targetlist!
Try select t1.x from t1, t2 where t1.y = 1 and t2.y = 1
- t2 scan target list will be empty and so no one tuple
will be returned...
1999-03-10 12:16:09 +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
Bruce Momjian
f7430af934 Fix OR index selectivity problem. 1999-03-08 14:01:57 +00:00
Bruce Momjian
c831d08fac Fix for Alpha OR selectivity bug. 1999-03-08 13:35:50 +00:00
Tom Lane
a431aaec44 Export include/utils/mcxt.h so that external stuff can include
palloc.h again.  Move exporting of backend header files out of libpq's
Makefile (whatever was it doing there in the first place?) and into
backend/Makefile.
1999-03-07 23:05:57 +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
60bb92af33 Really remove Recipe. 1999-03-07 03:34: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
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
98f739454c Remove recipe.o from Makefile ... dead code not quite dead enough,
it seems.
1999-02-27 21:42:33 +00:00
Tom Lane
b775655e8a Someone forgot to commit gram.c and parse.h after his latest
set of updates to gram.y.
1999-02-27 21:33:53 +00:00
Bruce Momjian
c438520b91 Remove reference to recipe.h. 1999-02-25 17:25:47 +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
Bruce Momjian
f3f7c2acde update comments 1999-02-24 10:20:07 +00:00
Bruce Momjian
02fa3e4394 Thank you for the advice. I concluded that current inet code has a
portability problem. Included patches should be applied to both
current and 6.4 tree. I have tested on LinuxPPC, FreeBSD and Solaris
2.6. Now the inet regression tests on these platforms are all happy.
---
Tatsuo Ishii
1999-02-24 03:17:05 +00:00
Thomas G. Lockhart
9fd28029eb Add a few other parser-only nodes for debugging help.
Define the JoinExpr node.
1999-02-23 08:01:47 +00:00
Thomas G. Lockhart
70600bd6f1 Clean up error messages. 1999-02-23 07:54:03 +00:00
Thomas G. Lockhart
681c587d22 Do a better job of selecting candidates among functions
when no exact match.
Clean up elog error messages.
1999-02-23 07:51:53 +00:00
Thomas G. Lockhart
b4def32439 Include some new code for outer joins. Disabled by default, but enable by
including the following in your Makefile.custom:
 CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG
1999-02-23 07:46:42 +00:00
Thomas G. Lockhart
449020f782 Put in explicit checks for implicit index name lengths.
Put in hooks for outer joins by passing a few parameters back and forth
 in function calls. May not be close to working yet.
1999-02-23 07:44:44 +00:00
Thomas G. Lockhart
03d5c070f0 Modify the outer join placeholder code with something closer to working
code. Works here, but not completely implemented past this point.
1999-02-23 07:42:41 +00:00
Thomas G. Lockhart
25cccc05aa Fix typos in comments. 1999-02-23 07:36:31 +00:00
Thomas G. Lockhart
6d73a8c0cb Add first code to help with outer joins.
Enable by defining
 CFLAGS+= -DENABLE_OUTER_JOINS -DEXEC_MERGEJOINDEBUG
in your Makefile.custom
1999-02-23 07:35:09 +00:00
Thomas G. Lockhart
97287e1d13 Fix typo in comment. 1999-02-23 07:33:09 +00:00
Thomas G. Lockhart
348ab94822 Rearrange order of subdirectory creation to help generate parse.h
file early enough to use in nodes/.
Try to be more complete for rules on generating parse.h,
 but it still does not work any better than before. Should be able to
 make correctly if parser/gram.y is updated even without a "make clean"
 but so far not there yet.
1999-02-23 07:24:08 +00:00
Bruce Momjian
1e70c1fe5d comments cleanup. 1999-02-22 19:55:44 +00:00
Bruce Momjian
7fe29ecefc comment cleanup. 1999-02-22 19:40:10 +00:00
Bruce Momjian
01ec673cba ifdef out append(). 1999-02-22 17:29:57 +00:00
Bruce Momjian
9aa7e899dc Ok. I found an align problem in lobj that might not appear other than
Solaris/sparc. Please apply included patches to
src/backend/storage/large_object/inv_api.c and try again. (These are

Tatsuo Ishii
1999-02-22 16:46:43 +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
ceb233ed11 more cleanup 1999-02-22 06:08:48 +00:00
Bruce Momjian
1ed5cbbfd8 Final optimizer cleanups. 1999-02-22 05:26:58 +00:00
Bruce Momjian
e73d417105 fix compile problem. 1999-02-22 01:57:50 +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
0ff2733355 Update pathkeys comparison function. 1999-02-20 18:01:02 +00:00
Bruce Momjian
148ec3b1d8 update pathkey description. 1999-02-20 16:32:35 +00:00
Bruce Momjian
9188aab758 add pathkeys description. 1999-02-20 16:28:20 +00:00
Bruce Momjian
67fd67f53a another rename of optimizer 1999-02-20 15:27:42 +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
cd38f08598 rename optimizer file name 1999-02-18 19:58:53 +00:00
Bruce Momjian
b4e7510e09 Enable bushy and right-hand queries by default. 1999-02-18 06:01:11 +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
Tom Lane
63393bdf90 Produce a more specific error message when backend sees EOF on
client connection.
1999-02-18 01:13:26 +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
cd550c7672 Update optimizer readme. 1999-02-15 22:19:01 +00:00
Tom Lane
390d5e9f14 regprocin should accept '-' signifying InvalidOid, for
symmetry with regprocout.
1999-02-15 16:29:32 +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
Tom Lane
944d3c395e Replace non-idiomatic nconc(x, lcons(y, NIL)) with lappend(x, y). 1999-02-15 02:04:58 +00:00
Tom Lane
dec354ca97 Fix a number of places that made faulty assumptions about
what is_opclause will accept.
1999-02-15 01:06:59 +00:00
Tom Lane
5500039843 Fix optimizer coredump with unary-operator WHERE clauses.
A test case is:
create table linetab (x line);
select * from linetab where ?| x;
which coredumps in 6.4.2 and current sources.
1999-02-14 22:24:25 +00:00
Bruce Momjian
d8b482be7c optimizer cleanup. 1999-02-14 05:27:12 +00:00
Bruce Momjian
808a6df065 optimizer rename. 1999-02-14 05:14:15 +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
8c3fff7337 Fix offset of one for date_part(timespan) when given arguments of
decade, century, or millenium.
1999-02-13 05:34:24 +00:00
Thomas G. Lockhart
a97683bc6c Change #if FALSE to #if NOT_USED to avoid port problems.
Fix problem with date_part() for timespan (had an offset of one)
 when given decade, century, and millenium as arguments.
 Reported by Ricardo J.C.Coelho.
1999-02-13 04:25:01 +00:00
Thomas G. Lockhart
910fe5891e Add routines to convert between int8 and text/varchar types.
Change #if FALSE to #if NOT_USED to avoid port problems.
Fix up pg_indent weirdness with function argument declarations.
1999-02-13 04:22:34 +00:00
Bruce Momjian
ad4b27ac3f Optimizer cleanup. 1999-02-12 17:25:05 +00:00
Bruce Momjian
c0d17c7aee JoinPath -> NestPath for nested loop. 1999-02-12 06:43:53 +00:00
Bruce Momjian
3fdb9bb9c7 Fix optimizer and make faster. 1999-02-12 05:57:08 +00:00
Bruce Momjian
55d0465009 optimizer update 1999-02-12 02:37:52 +00:00
Bruce Momjian
34ecb9d850 Optimizer cleanups. 1999-02-11 21:05:28 +00:00
Bruce Momjian
c873fcdaf4 Optimizer cleanup. 1999-02-11 17:21:51 +00:00
Bruce Momjian
8dc2209f71 optimizer cleanup 1999-02-11 17:03:17 +00:00
Bruce Momjian
6de25f09b1 Optimizer cleanup. 1999-02-11 17:00:49 +00:00
Bruce Momjian
4ea3f728e9 More optimization. 1999-02-11 16:09:41 +00:00
Bruce Momjian
d244df95db More optimizer speedups. 1999-02-11 14:59:09 +00:00
Bruce Momjian
129543e22d optimizer cleanup 1999-02-11 05:29:08 +00:00
Bruce Momjian
dbd80c97f4 Optimizer fix for samekeys() and cost fixes for longer optimizer keys. 1999-02-11 04:08:44 +00:00
Bruce Momjian
9dbb0efb0b Optmizer cleanup 1999-02-10 21:02:50 +00:00
Bruce Momjian
d5a785cd5a Update find_typedefs for bsdi 4.0. 1999-02-10 17:14:32 +00:00
Bruce Momjian
f859c81c18 Rename Path.keys to Path.pathkeys. Too many 'keys' used for other things. 1999-02-10 03:52:54 +00:00
Bruce Momjian
318e593f03 Rename Temp to Noname for noname tables. 1999-02-09 17:03:14 +00:00
Bruce Momjian
78511d8fe9 Optimizer fix for samekeys. 1999-02-09 06:30:45 +00:00
Bruce Momjian
fe35ffe7e0 Major optimizer improvement for joining a large number of tables. 1999-02-09 03:51:42 +00:00
Jan Wieck
be948af2e8 Added LIMIT/OFFSET functionality including new regression test for it.
Removed CURRENT keyword for rule queries and changed rules regression
accordingly. CURRENT has beed announced to disappear in v6.5.

Jan
1999-02-08 14:14:32 +00:00
Bruce Momjian
54e5d25666 Optimizer cleanup. 1999-02-08 04:29:25 +00:00
Jan Wieck
566c712c58 Revert some changes from the INTERSECT/EXPECT patch that broke
rule system semantics by having Var nodes referenced across multiple
parsetrees when rules split them.

Added more tests to the rules regression test.

The code in question resulted from v6.3 based development and was
a little careless applied to the v6.5 source tree.

Jan
1999-02-08 01:39:46 +00:00
Tom Lane
bd422fbce2 Simplify scanstr(), fix broken octal-escape code. 1999-02-07 23:59:59 +00:00
Tom Lane
f7c6a88c33 Simplify lexer's rules for string constants, eliminate potential buffer overrun. 1999-02-07 23:58:52 +00:00
Tom Lane
f280266985 Clean up some minor compile warnings. 1999-02-07 22:07:02 +00:00
Jan Wieck
04075a0c60 New gram.c after modification of gram.y
Jan
1999-02-07 19:04:59 +00:00
Jan Wieck
28fc5d7b83 Reenabled parentheses for grouping multiple rule actions and
added this syntax to rules regression test so it will show up
if someone breaks it again.

Jan
1999-02-07 19:02:20 +00:00
Jan Wieck
ef590e101e Changed ExecConstraints() and ExecRelCheck() to cache the constraints
qualification expression trees in the execution state. Prevents from
memory exhaustion on INSERT, UPDATE or COPY to tables that have CHECK
constraints. Speedup against the variant using freeObject() is more than
factor 2.

Jan
1999-02-07 16:17:14 +00:00
Jan Wieck
dd4a357dc9 Missing semicolon in last fix :-}
Jan
1999-02-07 14:20:11 +00:00
Jan Wieck
6fa3d0a7ab One more fix to QuerySnapshot usage in ExecutorStart(). Maybe
current QuerySnapshot could be NULL.

Jan
1999-02-07 13:54:58 +00:00
Jan Wieck
a5f3abacb5 Fixed problem with multiple portals shown up in portals_p2 regression
test after new AllocSet code.

Activated optimal AllocSet blocksize and chunk limit.

Jan
1999-02-07 13:37:56 +00:00
Tom Lane
65d320e7e4 Fix bracketing error in CaseExpr code 1999-02-07 03:02:21 +00:00
Tom Lane
48fd9a2cc2 Add equality checking for T_Query so that we don't get
complaints in UNION regress test.  Probably still need some more node
types to be handled here, but I'm done for the day...
1999-02-07 00:52:12 +00:00
Tom Lane
3fd3d028fb Add floating-point support to our emulation of snprintf
so that EXPLAIN works again.
1999-02-06 21:51:03 +00:00
Tom Lane
fd1afb7453 Fix silly typo causing SELECT INTO TABLE to sometimes be
treated as SELECT INTO TEMP TABLE.
1999-02-06 20:28:11 +00:00
Bruce Momjian
a553760845 Optimizer cleanup. 1999-02-06 17:29:30 +00:00
Jan Wieck
ead64f317b New alloc set code using a memory block pool for small allocations.
Jan
1999-02-06 16:50:34 +00:00
Bruce Momjian
7d2b3874aa optimizer cleanup 1999-02-05 20:34:11 +00:00
Bruce Momjian
6e2edaf4b8 Optimizer cleanup. 1999-02-05 19:59:31 +00:00
Bruce Momjian
d5db88142c Fix for returning stack pointer from selectivity, from Bernard Frankpitt. 1999-02-05 17:47:29 +00:00
Tom Lane
d3a85108c2 Fix silly typo in prune_joinrel 1999-02-05 03:43:05 +00:00
Bruce Momjian
c45e4925ab Optimizer cleanups. 1999-02-04 23:19:53 +00:00
Bruce Momjian
ae12e25263 Update optimizer comments. 1999-02-04 19:20:12 +00:00
Bruce Momjian
19cc38b28d Large object write-into-middle fix from Tatsuo Ishii. 1999-02-04 14:52:00 +00:00
Bruce Momjian
ce3afccf7f More optimizer cleanups. 1999-02-04 03:19:11 +00:00
Bruce Momjian
18fbe4142f More optimizer renaming HInfo -> HashInfo. 1999-02-04 01:47:02 +00:00
Bruce Momjian
9322950aa4 Cleanup of source files where 'return' or 'var =' is alone on a line. 1999-02-03 21:18:02 +00:00
Bruce Momjian
8d9237d485 Optimizer rename ClauseInfo -> RestrictInfo. Update optimizer README. 1999-02-03 20:15:53 +00:00
Jan Wieck
f3a6b38e32 Sort node for ORDER BY is suppressed if choosen index scan will
allways present tuples in the requested order.

Jan
1999-02-03 19:31:24 +00:00
Tom Lane
724119a979 Modify int8 to not depend on sscanf(), and fix configure's test
for int8 support.  configure now checks only snprintf() for int8 support,
not sprintf and sscanf as it used to.  The reason for doing this is that
if we are supplying our own snprintf code (which does handle long long int),
we now only need working long long support in the compiler not in the
platform's C library.  I have verified that int8 now passes regression test
on HPUX 9, and I think it should work on SunOS 4.1.* and other older
platforms if gcc is used.
1999-02-03 00:18:53 +00:00
Bruce Momjian
4090d17fee SET_ARGS cleanup 1999-02-02 23:53:26 +00:00
Bruce Momjian
f1b7823471 Make GEQO use dependent on table and index count. 1999-02-02 20:30:18 +00:00
Bruce Momjian
eb3415538e OK I found it,
I search in the planner for the '\xFF' appending.
Finally I found in MakeIndexable() in gram.y

Attach a patch which removes the "<=" test in USE_LOCALE,
might make some queries a bit slower for us "locale-heads",
BUT correct result is more important.

        regards,
--
-----------------
Göran Thyni
1999-02-02 19:20:54 +00:00
Bruce Momjian
a7ad43cd18 Included patches make some enhancements to the multi-byte support.
o allow to use Big5 (a Chinese encoding used in Taiwan) as a client
  encoding. In this case the server side encoding should be EUC_TW

o add EUC_TW and Big5 test cases to the regression and the mb test
  (contributed by Jonah Kuo)

o fix mistake in include/mb/pg_wchar.h. An encoding id for EUC_TW was
  not correct (was 3 and now is 4)

o update documents (doc/README.mb and README.mb.jp)

o update psql helpfile (bin/psql/psqlHelp.h)

--
Tatsuo Ishii
t-ishii@sra.co.jp
1999-02-02 18:51:40 +00:00
Bruce Momjian
8e958b8a38 Fix create_rule is->as. 1999-02-02 17:46:17 +00:00
Jan Wieck
7ab88a16a1 Fixed failed assertion happening in multiple action rules
when parsestate in makeRangeTable() already contains an
opened p_target_relation.

Jan
1999-02-02 12:57:51 +00:00
Bruce Momjian
4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Jan Wieck
7fc75517df Fixed growing of backend due to not pfree()'d data on COPY FROM
Fixed growing of backend if BEFORE DELETE trigger returns heap tuple
different from trigtuple.

Jan
1999-02-01 20:25:55 +00:00
Vadim B. Mikheev
072be47202 Initialize es_snapshot. 1999-02-01 13:33:27 +00:00
Tom Lane
757f403451 Tighten coding in samekeys(). Pretty braindead change,
but it saves almost 10% of the runtime in Charles Hornberger's optimizer
example, so what the heck ...
1999-02-01 04:20:50 +00:00
Tom Lane
36c1895533 Fix postmaster to not try to start more than MaxBackendId children,
per patch from Tatsuo Ishii
1999-01-30 20:04:37 +00:00
Vadim B. Mikheev
bfa6d510b3 Small fix for READ COMMITTED isolevel. 1999-01-29 13:24:36 +00:00
Vadim B. Mikheev
aaef7beb79 Hope that execMain.c good merged.
Fix for BEFORE ROW UPDATE triggers: result tuple may be different
(due to concurrent update) from one initially produced by top level plan.
1999-01-29 11:56:01 +00:00
Vadim B. Mikheev
1d41e88568 Trying to fix bad merging... 1999-01-29 10:15:09 +00:00
Vadim B. Mikheev
e3a1ab764e READ COMMITTED isolevel is implemented and is default now. 1999-01-29 09:23:17 +00:00
Tom Lane
b946244c1c Quick fix for subplan-related crash. 1999-01-27 16:48:20 +00:00
Jan Wieck
28d8b42ca5 Speedup of PL/pgSQL by calling ExecEvalExpr() directly
instead of SPI_execp() for simple expressions.

Jan
1999-01-27 16:15:22 +00:00
Bruce Momjian
d611ccb874 fix for aggregates 1999-01-27 16:15:01 +00:00
Marc G. Fournier
2ae5d51668 From: Tatsuo Ishii <t-ishii@sra.co.jp>
Included patches fix a portability problem of unsetenv() used in
6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and
Linux so I decided to replace with putenv().
1999-01-27 01:18:23 +00:00
Tom Lane
e27f8791f9 Turns out it's easy to cache the fmgr function lookup
result, too ... another little bit of speed for SELECT.
1999-01-27 01:11:43 +00:00
Tom Lane
422221c90d Another SELECT speedup: extract OIDs of column print functions
only once per SELECT, not once per tuple.  10% here, 10% there,
pretty soon you're talking about real speedups ...
1999-01-27 00:36:28 +00:00
Bruce Momjian
36693c0525 More agg cleanup. 1999-01-26 23:32:04 +00:00
Marc G. Fournier
38a5bda208 primary key support cleanups from D'Arcy... 1999-01-26 14:38:52 +00:00
Bruce Momjian
692a65e6ff pgindent file. 1999-01-26 05:57:14 +00:00
Bruce Momjian
1401f63dd1 Agg/Aggreg cleanup and datetime.sql patch. 1999-01-25 18:02:28 +00:00
Vadim B. Mikheev
247b3f9054 SELECT FOR UPDATE is implemented... 1999-01-25 12:01:19 +00:00
Tom Lane
443e24beb7 Tighten coding of fmgr_isbuiltin() ... managed to speed it up
by about 10% which seems to be good for half a percent or so of a SELECT.
1999-01-25 00:44:53 +00:00
Tom Lane
49b6be244c Tighten coding of inner loops in nocachegetattr ...
seems to have improved speed of routine by 5% or so ...
1999-01-24 22:53:25 +00:00
Tom Lane
18577547d4 Use heap_attisnull, rather than heap_getattr, for a small
but useful speedup.
1999-01-24 22:50:58 +00:00
Tom Lane
d03e98737c Replace typtoout() and gettypelem() with a single routine,
so that fetching an attribute value needs only one SearchSysCacheTuple call
instead of two redundant searches.  This speeds up a large SELECT by about
ten percent, and probably will help GROUP BY and SELECT DISTINCT too.
1999-01-24 05:40:49 +00:00
Tom Lane
77f5428244 Fix a couple little problems with signed vs. unsigned
characters ...
1999-01-24 02:47:15 +00:00
Bruce Momjian
17467bb7fb Rename Aggreg to Aggref. 1999-01-24 00:28:37 +00:00
Tom Lane
157349e3af Improper addition of NaN/Infinity recognition to float8in()
was causing it not to detect out-of-range float values, as evidenced by
failure of float8 regression test.  I corrected that logic and also
modified expected float8 results to account for new error message
generated for out-of-range inputs.
1999-01-24 00:12:59 +00:00
Bruce Momjian
598a4e15dd Remove unused Choose node. 1999-01-23 23:28:09 +00:00
Tom Lane
e6725d1574 Add explicit buffering in backend libpq, to compensate for
buffering lost by not going through stdio anymore for client I/O.
1999-01-23 22:27:29 +00:00
Bruce Momjian
598b628b27 Fix for intersect FOR UPDATE check. 1999-01-22 19:35:54 +00:00
Bruce Momjian
15871b48c4 Relcache Size fix. 1999-01-22 18:47:37 +00:00
Bruce Momjian
753c9cb9dd Fix for Size sizeof in cache code. 1999-01-22 16:49:25 +00:00
Bruce Momjian
03155dc764 It seems that SPI_prepare() doesn't work well in some cases.
Pawel Pierscionek [pawel@astercity.net] reported about the
following case 1([SQL] drop table in pgsql).
Michael Contzen [mcontzen@dohle.com] reported about the
following case 2(PL/PGSQL bug using aggregates).
You can find it from pgsql-hackers archive.

1. PL/pgSQL can't execute UTILITY commands.
   SPI_prepare() doesn't copy(save) the utilityStmt member of
   Query type nodes,because copyObject() is not implemented
   for nodes of (Create/Destroy etc)Stmt type.

2. Aggregates in PL/pgSQL cause wrong results.

...
   It's a list including Aggreg type nodes which exist in
   TargetList(i.e Aggreg type nodes are common to aggs
   member list and TargetList).
   AFAIC the common pointer is not copied to the same
   pointer by copyObject() function.
   In my patch I reconstruct aggs member node from
   new(copied) Agg type node.
   Is it proper to use set_agg_tlist_references() function to
   reconstruct aggs member node for Agg type nodes ?

Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp
1999-01-21 22:55:41 +00:00
Bruce Momjian
c91dbcc5c7 The following patch finishes primary key support. Previously, when
a field was labelled as a primary key, the system automatically
created a unique index on the field.  This patch extends it so
that the index has the indisprimary field set.  You can pull a list
of primary keys with the followiing select.

SELECT pg_class.relname, pg_attribute.attname
    FROM pg_class, pg_attribute, pg_index
    WHERE pg_class.oid = pg_attribute.attrelid AND
        pg_class.oid = pg_index.indrelid AND
        pg_index.indkey[0] = pg_attribute.attnum AND
        pg_index.indisunique = 't';

There is nothing in this patch that modifies the template database to
set the indisprimary attribute for system tables.  Should they be
changed or should we only be concerned with user tables?

D'Arcy
1999-01-21 22:48:20 +00:00
Vadim B. Mikheev
1f37905681 Copy RowMark node (it's for (-:)) FOR UPDATE). 1999-01-21 16:38:36 +00:00
Vadim B. Mikheev
12be3e08f1 FOR UPDATE is in parser & rules. 1999-01-21 16:08:55 +00:00
Bruce Momjian
c8ae6afd13 Update gram.c. 1999-01-20 22:31:07 +00:00
Bruce Momjian
2a6081235c Add Intersect check. 1999-01-20 19:48:13 +00:00
Thomas G. Lockhart
1ace93c46c Fix "Y-2K" problem with two-digit BC dates being corrected by two millenia.
They are not corrected now.
Allow the date type to accept BC dates.
Share more date/time validation declarations through dt.h.
1999-01-20 16:29:39 +00:00
Thomas G. Lockhart
974757f19a Add a set of braces to clarify conditional nesting.
gcc complained about ambiguities.
1999-01-20 16:24:59 +00:00