Commit Graph

2508 Commits

Author SHA1 Message Date
Thomas G. Lockhart 2119b523c5 Fix numeric comparision (... != NULL) to be (... > 0). gcc is happier now.
Add non-working code which is commented-out to copy GroupClause structures.
1997-12-23 19:53:30 +00:00
Thomas G. Lockhart 12d5c30c8c Add routines to print AExpr, Ident, and AConst parsing structures. 1997-12-23 19:50:54 +00:00
Thomas G. Lockhart 2c833a728f Implement CREATE TABLE ... AS SELECT borrowing code from SubSelect
and from SELECT ... INTO ... support code.
Allow NOT, IS NULL, IS NOT NULL in constraints.
Define unionall boolean flag in SubSelect structure.
Implement row descriptors: (a, b, c) = (x, y, z).
Change IS TRUE, IS FALSE, etc. to expressions using "=" rather than
 function calls to istrue() or isfalse() to allow optimization.
Force type for TRUE and FALSE to bool.
1997-12-23 19:47:32 +00:00
Thomas G. Lockhart 8ed721ffef Change variable name reference from selectClause to more appropriate unionClause.
Add a few lines of test code playing with the unique flag for unions.
 Does not do much helpful yet.
1997-12-23 19:39:42 +00:00
Thomas G. Lockhart 98f5975cb0 Fix up some elog error messages. 1997-12-23 19:36:20 +00:00
Thomas G. Lockhart 7c682b46c9 Expand a few date/time routine names to > 16 characters now that this
is legal. Fix a little whitespace in other declarations.
1997-12-23 19:29:15 +00:00
Thomas G. Lockhart ca23837ade Fix format to produce actual German style. Affects new "GERMAN" feature only. 1997-12-23 19:26:31 +00:00
Thomas G. Lockhart ed14f88512 Change logic slightly to avoid one unnecessary calculation. No big deal. 1997-12-23 19:24:43 +00:00
Thomas G. Lockhart c06331a47d Change a few routine names back to full length now that pg_proc allows
names over 16 characters. datet_datetime() -> datetime_datetime(), etc.
1997-12-23 19:23:09 +00:00
Bruce Momjian e4bd9127cb Remove regression in function. 1997-12-23 03:27:23 +00:00
Bruce Momjian 3827555869 Fix notty output to show status result. -q option still turns it off. 1997-12-22 20:03:53 +00:00
Bruce Momjian ad43a7219c Fix for test 0 error. 1997-12-22 05:56:43 +00:00
Bruce Momjian d404f1006b Fix for select 1=1 or 2=2, select 1=1 and 2=2, and select sum(2+2). 1997-12-22 05:42:25 +00:00
Bruce Momjian 78a055a659 Remove some recursion in optimizer and clean up some code there. 1997-12-21 05:18:48 +00:00
Marc G. Fournier 0808e658a7 Potential fix for Bruce's "test" problem 1997-12-20 18:36:26 +00:00
Bruce Momjian 7fd4782504 Fix aggregates on inherited tables. 1997-12-20 07:59:44 +00:00
Marc G. Fournier 1783963cab Move more to dynloader subdir 1997-12-20 04:48:11 +00:00
Marc G. Fournier 44be631dd8 Make sure distclean works as well as clean 1997-12-20 04:43:20 +00:00
Marc G. Fournier 3cc95146c4 Missed a HAVE_ 1997-12-20 04:26:27 +00:00
Marc G. Fournier 9a60a20f99 fix so that dynloader.h is included instead of port-protos.h 1997-12-20 04:13:31 +00:00
Marc G. Fournier a38bd20b83 Fix use of variable in Makefile.in 1997-12-20 04:10:35 +00:00
Marc G. Fournier 0356acebd5 Make sure configure reflects changes 1997-12-20 03:41:06 +00:00
Marc G. Fournier 1d5cd311d1 Oops, forgot to add what I took away 1997-12-20 03:38:20 +00:00
Marc G. Fournier e3a18f6f50 More cleanups... 1997-12-20 03:36:35 +00:00
Marc G. Fournier 722fa83f05 More ports switched over 1997-12-20 03:23:46 +00:00
Marc G. Fournier b5466f8669 Move over the BSDi port files 1997-12-20 03:13:59 +00:00
Marc G. Fournier a0bc7aa74c This should get the linux port to work... 1997-12-20 02:36:26 +00:00
Marc G. Fournier 20ff6432a1 Get it so that everything else *should* work with my changes... 1997-12-20 02:33:56 +00:00
Marc G. Fournier 6e337eef45 Major cleanout of PORTNAME variables from Makefiles...bound to screw up
some of the ports...
1997-12-20 00:29:35 +00:00
Marc G. Fournier 10ff1eea60 First clean compile without a "PORTNAME" variable being set... 1997-12-20 00:11:13 +00:00
Marc G. Fournier 93e74460a9 removed the port-protos.h from bsd a little too quick...remedied now 1997-12-19 23:17:42 +00:00
Marc G. Fournier f4ceaf8484 If this doesn't break something, nothing will *muhahaha*
Just got rid of PORTNAME altogether for FreeBSD and AIX...more to follow
1997-12-19 23:10:16 +00:00
Marc G. Fournier 153558dff8 These files will get link'd to 'dynloader.[ch]', from configure, which
will then get link'd into SUBSYS.o
1997-12-19 22:58:27 +00:00
Marc G. Fournier 56a7d9fac2 More removal of port dependent stuff 1997-12-19 22:56:03 +00:00
Marc G. Fournier 903e21b451 More cleanups. Move alot of the prototype definitions straight into
config.h, right beside their appropriate HAVE_ #ifdefs...one central
location that is included everywhere...
1997-12-19 22:47:00 +00:00
Marc G. Fournier 4ee5f2b965 Get rid of PORTNAME from Makefile.global.in... 1997-12-19 21:29:28 +00:00
Marc G. Fournier 1f9eb5c106 Add regression output from FreeBSD 1997-12-19 21:23:19 +00:00
Bruce Momjian e2aec508e2 Replace foo/bar to l1/l2. 1997-12-19 16:54:15 +00:00
Marc G. Fournier d370849a9d Here is the difference between expected->results of the regression
tests under sparc_solaris
1997-12-19 15:50:18 +00:00
Marc G. Fournier c6bd6860d7 More cleanups...only need one rusagestub.h 1997-12-19 13:35:17 +00:00
Marc G. Fournier 5acf432ddb remove port from OBJS line... 1997-12-19 13:28:06 +00:00
Marc G. Fournier 429b9d6691 Nice clean compile...still need to run regression tests, but its a major
start
1997-12-19 03:42:14 +00:00
Marc G. Fournier d7046ada02 Update configure so that it auto-detects and configures for missing
functions...
1997-12-19 03:08:03 +00:00
Marc G. Fournier 2b4db36c00 Okay, that's it for tonight...broke a few ports, most likely, but that
is expected...a few ports don't have "ports" anymore, with most things
auto-configured by configure like it should be :)
1997-12-19 03:06:22 +00:00
Marc G. Fournier 70718dc25a More cleanups 1997-12-19 02:56:35 +00:00
Marc G. Fournier 3aae0f5300 More cleanups...several ports are major redundancies of other ports 1997-12-19 02:46:25 +00:00
Marc G. Fournier 3ad815fc2a port.c no longer required...individual functions that were in there are
auto-generated via configure

individual functions in individual files
1997-12-19 02:27:20 +00:00
Marc G. Fournier 5379b84eff More cleanups. I can now compile without PORTNAME being defined n
Makefile.global.

End result, if all goes well, should allow for much easier porting, since
there will no longer be a concept of a "port".  Most, if not everything,
*should* be determined by configure, or by the compiler itself.  Still
work to be done though :)
1997-12-19 02:09:10 +00:00
Bruce Momjian 30856a3904 copy query cleanup. 1997-12-18 19:46:37 +00:00
Bruce Momjian 72c296dffc Remove init_query_planner(), merged into planner(). 1997-12-18 19:41:44 +00:00
Bruce Momjian e9182152ec Fix copy for no aggregates. 1997-12-18 19:13:49 +00:00
Bruce Momjian 6a45941f2f Remove Existential, and ifdef out generate_fjoin. Neither did anything. 1997-12-18 12:54:45 +00:00
Bruce Momjian 4469eb63a3 Cost cleanup. 1997-12-18 12:30:44 +00:00
Bruce Momjian d3f0e87d17 Cost cleanup. 1997-12-18 12:21:02 +00:00
Bruce Momjian 6b00ec3713 Cleanup of agg copy. 1997-12-18 05:58:40 +00:00
Bruce Momjian bf9c9f716c Cleanup of agg copy. 1997-12-18 04:33:31 +00:00
Bruce Momjian c64cc3228a Fix Query handling for inheritance, and cost computations. 1997-12-18 03:03:41 +00:00
Thomas G. Lockhart d451a3b3bc Enable timespan_finite() and text_timespan() routines (was commented out).
Define an "ISO-style" timespan output format with "hh:mm:ss" fields.
 Enabled by DateStyle = USE_ISO_DATES.
1997-12-17 23:22:17 +00:00
Thomas G. Lockhart 5af05c0a59 Move declarations for timespan2tm() and tm2timespan() from dt.c to here. 1997-12-17 23:19:28 +00:00
Bruce Momjian 5266471a2f Rename Query label so ctags finds real structure. 1997-12-17 18:21:37 +00:00
Bruce Momjian d158fce8eb Add optimizer README file. 1997-12-17 18:02:33 +00:00
Marc G. Fournier 542d4e528d First pass through, of many to come, towards making the whole source
tree "non-PORTNAME" dependent.  Technically, anything that is PORTNAME
dependent should be able to be derived at compile time, through configure
or through gcc
1997-12-17 04:59:16 +00:00
Marc G. Fournier 9ef6b32c47 Makefile cleaned up
async.c: #include <port-protos.h> surrounded by an #ifdef HAVE_STRDUP

vacuum.c: #include <port-protos.h> commented out...can someone comment as
          to why it was included, as it doesn't seem to have any effect
          under FreeBSD so far...would like some sort of #ifdef wrapper
          like async.c if possible
1997-12-17 04:44:50 +00:00
Marc G. Fournier e2d9501094 Clean up the Makefiles
Essentially, this cleans things up so that if PORTNAME isn't defined (I'm
    working on getting rid of it for FreeBSD, at least, to see if its possible)
    none of the PORTNAME related stuff gets passed around.

	Had a little bit of -I related redundancy as well
1997-12-17 04:31:34 +00:00
Marc G. Fournier ceabf8cab9 Make it entirely possible for PORTNAME to be undefined 1997-12-17 04:03:30 +00:00
Marc G. Fournier 6bdcad66e4 Add recognition for 'machten' 1997-12-17 03:23:52 +00:00
Thomas G. Lockhart b31df3ebb7 Mention PST8PDT explicitly in the banner message (rather than PST/PDT). 1997-12-16 16:01:05 +00:00
Thomas G. Lockhart 6316f4d3db Define text, varchar, and bpchar string length functions. 1997-12-16 15:59:11 +00:00
Thomas G. Lockhart 6873af55cf Use MAXPGPATH to declare size of socket name storage. 1997-12-16 15:58:14 +00:00
Thomas G. Lockhart 8de20a3aed Use environment variable PGDATESTYLE on backend startup to initialize
date/time formats and conventions.
1997-12-16 15:57:00 +00:00
Thomas G. Lockhart a58825a467 Add declarations for text, bpchar, and varchar length functions.
Remove declarations in builtins.h duplicated in dt.h.
Change a few return type declarations to use "type *"
 rather than "struct ...".
1997-12-16 15:55:17 +00:00
Thomas G. Lockhart 3551ee097f Add declarations for text, bpchar, and varchar length functions. 1997-12-16 15:53:17 +00:00
Thomas G. Lockhart 331a163693 Allow multiple-argument functions in constraint clauses.
Formerly allowed only single arguments.
Declare column constraints using the usual list mechanism rather
 than explicit itemized lists.
Remove NOTNULL from default clause syntax (retain "NOT NULL").
 NOTNULL is not SQL92; eventually remove it from expressions too?
Move ISNULL, NOTNULL to Postgres-specific token declarations.
Fix up tabs and indenting on new CREATE USER commands.
1997-12-16 15:50:54 +00:00
Thomas G. Lockhart 640fe03bcf Improve (well, ok, fix) generated constraint name for column CHECK clause. 1997-12-16 15:45:46 +00:00
Bruce Momjian eb825d356e Fix order of keywords, must be alphabetical. 1997-12-16 05:04:00 +00:00
Bruce Momjian 0f1802f00c Fix for user password packet processing, from Goran Thyni. 1997-12-15 22:03:59 +00:00
Bruce Momjian ab179d6940 Make password null on startup. 1997-12-12 16:26:36 +00:00
Bruce Momjian c60f70b53f Rename pg_plan and pg_eval to be more meaningful. 1997-12-11 17:36:58 +00:00
Bruce Momjian 645cc13276 Remove PGDATA setting and use DataDir. 1997-12-11 17:03:52 +00:00
Bruce Momjian b69359e2d7 Spark/Linux patch for locking, from Tom Szybist 1997-12-09 20:55:33 +00:00
Marc G. Fournier da72b903ff Major code cleanup following the pg_password insertion...
...malloc/free -> palloc/pfree
	...fopen/fclose -> AllocateFile/FreeFile
1997-12-09 03:11:25 +00:00
Thomas G. Lockhart 405740ace6 Include informational messages added for implicit index creation. 1997-12-09 01:46:31 +00:00
Thomas G. Lockhart 2ac4cf5502 Add information message about implicitly created indices.
Check for duplicate implicit index names and generate unique names.
1997-12-09 01:44:14 +00:00
Thomas G. Lockhart a440f8e3d7 Remove trailing period from an elog message.
Most other messages do not have one.
1997-12-09 01:40:30 +00:00
Bruce Momjian 53026db75e More VARHDRSZ additions. 1997-12-08 04:42:48 +00:00
Marc G. Fournier bec35da8bf Add error check on getenv("DATADIR")
Add code to set DATADIR in postmaster.c if -D is used
1997-12-07 20:57:45 +00:00
Bruce Momjian a68a132a6c Add VARHDRSZ where needed. Many places just used 4. 1997-12-06 22:57:36 +00:00
Thomas G. Lockhart d358456ca3 Add test for multi-character char(). 1997-12-05 01:14:55 +00:00
Bruce Momjian 5a5cb30096 Fix tolower loops to go in proper direction for cache. 1997-12-05 01:13:24 +00:00
Marc G. Fournier 84fc5c4aed I found one other change that I would like to make to the
src. It is in the function ParseACL. When I find that I
can not allocate enough memory for the ACL structure I
return an NULL instead of doing an exit_nicely(g_conn);

From: Matthew C Aycock <maycock@scuba.pcpipeline.com>
1997-12-05 01:04:25 +00:00
Thomas G. Lockhart 733f2a43cc Change constraint syntax to SQL92 style.
Add tests for PRIMARY KEY and UNIQUE clauses.
1997-12-05 00:01:22 +00:00
Thomas G. Lockhart 5d7c9119fa Define USE_GERMAN_DATES for use in date/time I/O functions. 1997-12-04 23:58:01 +00:00
Thomas G. Lockhart dc88e795d1 Change Constraint structure to be a full node structure.
Add new constraint types PRIMARY, UNIQUE.
1997-12-04 23:55:52 +00:00
Thomas G. Lockhart 77356a7fc1 Add Constraint node type.
Remove TimeRange node type tag (everything else already gone).
1997-12-04 23:43:59 +00:00
Thomas G. Lockhart 352b36877f Add 'GERMAN' style to date/time output.
Probably have it wrong (dd.mm/yyyy) but can change it when we know.
 Input routines always handled it.
1997-12-04 23:30:52 +00:00
Thomas G. Lockhart d7e0e61d84 Run through toupper() conversion in the forward direction.
Most processors should optimize this a bit better wrt cache prefetch.
1997-12-04 23:28:20 +00:00
Thomas G. Lockhart 6ad698c928 Add some printing capability for a few more node types (CreateStmt,
IndexStmt, IndexElem, ColumnDef).
1997-12-04 23:20:32 +00:00
Thomas G. Lockhart 0295864514 Add 'GERMAN' option to DateStyle. 1997-12-04 23:17:13 +00:00
Thomas G. Lockhart 0569136e48 Change Constraint structure name from ConstraintDef to Constraint.
Change reference to field inside to be compatible with new definition
 as a "node" structure rather than a specialty structure.
1997-12-04 23:15:28 +00:00
Thomas G. Lockhart 1ac4ae4993 Add SQL92-compliant syntax for constraints.
Implement PRIMARY KEY and UNIQUE clauses using indices.
1997-12-04 23:07:23 +00:00
Bruce Momjian 8d30b40843 Update description for PGHOST and unix domain sockets. Add warning for failed connections. 1997-12-04 20:32:35 +00:00
Bruce Momjian 7d2fafe636 Update description for PGHOST and unix domain sockets. Add warning for failed connections. 1997-12-04 20:26:37 +00:00
Marc G. Fournier 8a57e21c30 Incorporate patch from Matt(maycock@intelliquest.com) for dumping ACLs
Clean up formatting of code

Integrate new functions into dumpTable


This is not tested yet...have to recompile server due to patches from
Todd...but this compiles cleanly as it stands now
1997-12-04 01:31:28 +00:00
Marc G. Fournier a91ad1af09 Missed a few files from Todd's patch...oops :) 1997-12-04 00:34:01 +00:00
Marc G. Fournier 4c04f7724e From: todd brandys <brandys@eng3.hep.uiuc.edu>
An extension to the code to allow for a pg_password authentication database
that is *seperate* from the system password file
1997-12-04 00:28:15 +00:00
Bruce Momjian 333323f304 Fix vacuum analyze syntax problem. 1997-12-02 16:09:15 +00:00
Marc G. Fournier 899326a78b the -l option doesn't take a port option, so the man page shouldn't say it
does
1997-12-02 03:43:54 +00:00
Marc G. Fournier 3253f9e222 gmake distclean wasn't removing the configure generated Makefile in
pg_version...

...fixed
1997-12-02 03:19:42 +00:00
Thomas G. Lockhart 8f4865bdd7 Remove premature code in constraint parsing.
Change elog WARN to NOTICE for unimplemented constraints.
1997-12-02 02:54:15 +00:00
Marc G. Fournier 9257cb65b2 Linux related change to .similar to handle 'a.out' files...
From: Herb Richter <hgr@buynet.com>
1997-12-02 02:43:08 +00:00
Bruce Momjian b05eddaaab Fix pg_dump, and libpq changes. 1997-12-01 22:02:49 +00:00
Bruce Momjian dfc1a6a848 Document pg_dump -z, clean up option list. Fix problem with libpq handling of field names uppercase code. 1997-12-01 21:01:24 +00:00
Thomas G. Lockhart df823bc42d Deep-six tests using time travel, which has been removed from Postgres. 1997-12-01 02:51:07 +00:00
Thomas G. Lockhart 7a86a2a9e5 Add tests for varchar() and combinations of string types. 1997-12-01 02:48:47 +00:00
Thomas G. Lockhart 1d7b6f14e2 Adjust tests to reflect removal of time travel.
Add tests for strings and varchar.
1997-12-01 02:46:13 +00:00
Thomas G. Lockhart f901971c86 Adjust output to reflect changes in tests. 1997-12-01 02:44:53 +00:00
Thomas G. Lockhart 07c1837f50 Change elog WARN messages for UNIQUE and PRIMARY, FOREIGN KEY
to NOTICE messages so that execution proceeds rather than halting.
 These clauses are ignored as stated in the messages.
Allow NOT NULL UNIQUE syntax (both were allowed individually before).
Allow Postgres-style casting ("::") of non-constants.
1997-11-30 23:11:10 +00:00
Thomas G. Lockhart 361f9e7f8d Add comments and move a few declaration blocks to help readability.
No functional changes this time!
1997-11-30 23:05:39 +00:00
Thomas G. Lockhart b12ba5f695 Specify hash table support functions for float8 and int4 rather than using
btree support functions. Don't know why this was that way, but would
 assume that these should be consistant with all other types with
 hash support. Regression tests OK.
Change a few comments and field alignment to make things more readable.
1997-11-30 23:03:28 +00:00
Thomas G. Lockhart 2c98143681 Add datetime and timespan hash index declarations. Use float8 for both;
certainly OK for datetime since it is a float8 and should be OK for
 timespan since the first field within timespan is a float8.
Use float8 hash function for time type (rather than char8).
1997-11-30 22:58:07 +00:00
Thomas G. Lockhart d16b4767fe Remove duplicate block of declarations. Must have been introduced recently
since I've run ./duplicate_oids (and found no problems) in the last
 couple of months.
Add and modify some DESCR() entries to describe functions.
1997-11-30 22:52:24 +00:00
Thomas G. Lockhart abedcddbd1 Change hash field for a few equality operators so all have it set.
Don't know why these few were not already this way, and don't know if
  there is some hidden problem with this, but assume it was done
  accidentally as entries were copied from other operators.
 Regression tests are OK, but...
Move one block of declaration source to keep OIDs in increasing order.
 Did not change OID values, just moved source code.
1997-11-30 22:49:22 +00:00
Thomas G. Lockhart 9faa6cabc5 Add pg_type.h to include list to regain declaration of type OID assignments.
Lost these when some include files were reorganized.
 Regression test could not compile.
1997-11-30 22:42:58 +00:00
Bruce Momjian 7059464335 Fix for \dd on types. 1997-11-30 17:46:01 +00:00
Bruce Momjian 002796b5ca Rename heap_destroyr to heap_destroy, heap_destroy to heap_destroy_with_catalog. 1997-11-28 17:28:02 +00:00
Bruce Momjian c445ba331b Rename heap_create to heap_create_and_catatlog, rename heap_creatr to heap_create(). 1997-11-28 04:40:40 +00:00
Bruce Momjian a8926e0461 Salt fix for password, from Tatsuo Ishii. 1997-11-27 03:11:55 +00:00
Bruce Momjian 241a87b951 Prevent flushing from packets, by Massimo. 1997-11-27 03:01:12 +00:00
Bruce Momjian db00632e0f Cleaups of comments. 1997-11-27 02:23:02 +00:00
Bruce Momjian bac80c218e Add README for parser directory 1997-11-26 15:36:00 +00:00
Bruce Momjian d79b9a1b7a Re-order args for TypeCreate() to be clearer. 1997-11-26 04:50:47 +00:00
Bruce Momjian 7c00ffb843 Fix from Zeugswetter Andreas DBT for Sendproc. 1997-11-26 04:37:53 +00:00
Bruce Momjian 983ec2cb4b Make parser functions static where possible. 1997-11-26 03:54:23 +00:00
Bruce Momjian b704426618 Make parser functions static where possible. 1997-11-26 03:43:18 +00:00
Bruce Momjian 97ad0b1cd4 \dd fix. 1997-11-26 02:34:28 +00:00
Bruce Momjian 43c7114b48 Cleanup up include files. 1997-11-26 01:26:13 +00:00
Bruce Momjian 598e86f3b3 Cleanup up include files. 1997-11-26 01:14:33 +00:00
Bruce Momjian 4a5b781d71 Break parser functions into smaller files, group together. 1997-11-25 22:07:18 +00:00
Bruce Momjian 3aff4011c7 Remove gram problems with archive. 1997-11-24 16:55:22 +00:00
Bruce Momjian 91742c5c24 Change heading. 1997-11-24 14:15:11 +00:00
Bruce Momjian 4857de6be4 Cleanup wrapping in \d commands. 1997-11-24 14:05:02 +00:00
Bruce Momjian a986b7ba4d Move descriptions to pg_proc, add descriptions. 1997-11-24 13:43:29 +00:00
Bruce Momjian 49656346b8 Move dbcommands.c to commands/. It should not be in the parser directory. 1997-11-24 05:32:56 +00:00
Bruce Momjian 36e3df0767 Move dbcommands.c to commands/. It should not be in the parser directory. 1997-11-24 05:21:03 +00:00
Bruce Momjian f7f2e18f8e Remove tqual.h includes not needed. 1997-11-24 05:09:50 +00:00
Bruce Momjian 1409819a87 Fix for textcat on varchar() fields. 1997-11-23 21:39:12 +00:00
Bruce Momjian f4253b0b49 Archive cleanups. 1997-11-21 19:59:39 +00:00
Bruce Momjian 195f78e43c More archive cleanup. 1997-11-21 19:12:41 +00:00
Bruce Momjian 043cebce2b More archive cleanup. 1997-11-21 19:02:59 +00:00
Bruce Momjian 629e27284d Remove unused files. 1997-11-21 18:22:04 +00:00