Commit Graph

145 Commits

Author SHA1 Message Date
Bruce Momjian 29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Tom Lane a78fcfb512 Restructure operator classes to allow improved handling of cross-data-type
cases.  Operator classes now exist within "operator families".  While most
families are equivalent to a single class, related classes can be grouped
into one family to represent the fact that they are semantically compatible.
Cross-type operators are now naturally adjunct parts of a family, without
having to wedge them into a particular opclass as we had done originally.

This commit restructures the catalogs and cleans up enough of the fallout so
that everything still works at least as well as before, but most of the work
needed to actually improve the planner's behavior will come later.  Also,
there are not yet CREATE/DROP/ALTER OPERATOR FAMILY commands; the only way
to create a new family right now is to allow CREATE OPERATOR CLASS to make
one by default.  I owe some more documentation work, too.  But that can all
be done in smaller pieces once this infrastructure is in place.
2006-12-23 00:43:13 +00:00
Tom Lane 1d45168f4b Fix some misuses of strncat(). 2006-09-27 16:19:42 +00:00
Bruce Momjian e0522505bd Remove 576 references of include files that were not needed. 2006-07-14 14:52:27 +00:00
Bruce Momjian 51e8882197 Revert part of recent include patch not ready for application. 2006-07-14 04:59:30 +00:00
Bruce Momjian 03c2e5924e Add additional includes needed on some platforms. 2006-07-14 04:44:46 +00:00
Tom Lane ff0ac57db9 Remove extremely old, incomplete, broken example code.
Per my proposal a few days ago.
2006-06-05 21:16:32 +00:00
Tom Lane 8f165ee13b Make PG_MODULE_MAGIC required in shared libraries that are loaded into
the server.  Per discussion, there seems no point in a waiting period
before making this required.
2006-05-31 20:58:09 +00:00
Tom Lane a0ffab351e Magic blocks don't do us any good unless we use 'em ... so install one
in every shared library.
2006-05-30 22:12:16 +00:00
Bruce Momjian 9da6508e0a Change \; to ; in RULE, \; unnecessary. 2006-05-22 14:08:06 +00:00
Bruce Momjian ad98575617 Use SQL standard '' rather than \' for tutorial/sample code.
Backpatch to 8.1.X.
2006-05-11 19:21:14 +00:00
Bruce Momjian f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Bruce Momjian f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Neil Conway 8e5a10d46c This patch makes the error message strings throughout the backend
more compliant with the error message style guide. In particular,
errdetail should begin with a capital letter and end with a period,
whereas errmsg should not. I also fixed a few related issues in
passing, such as fixing the repeated misspelling of "lexeme" in
contrib/tsearch2 (per Tom's suggestion).
2006-03-01 06:30:32 +00:00
Peter Eisentraut 7f4f42fa10 Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH ()
construct.
2006-02-27 16:09:50 +00:00
Neil Conway fb627b76cc Cosmetic code cleanup: fix a bunch of places that used "return (expr);"
rather than "return expr;" -- the latter style is used in most of the
tree. I kept the parentheses when they were necessary or useful because
the return expression was complex.
2006-01-11 08:43:13 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Tom Lane 0b36cb83dc PGXS should be set with := not =, as specified in the documentation,
to avoid useless multiple executions of pg_config.
2005-09-27 17:13:14 +00:00
Tom Lane 2498d8296e Clean up some stray remaining references to pg_shadow, pg_user, pg_group. 2005-08-15 02:40:36 +00:00
Tom Lane 3810c23fe4 Adjust src/tutorial Makefile so that it can use pgxs. This allows the
tutorial to be used without necessarily having a configured source tree.
2005-01-13 18:23:22 +00:00
PostgreSQL Daemon 2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Tom Lane 375369acd1 Replace TupleTableSlot convention for whole-row variables and function
results with tuples as ordinary varlena Datums.  This commit does not
in itself do much for us, except eliminate the horrid memory leak
associated with evaluation of whole-row variables.  However, it lays the
groundwork for allowing composite types as table columns, and perhaps
some other useful features as well.  Per my proposal of a few days ago.
2004-04-01 21:28:47 +00:00
PostgreSQL Daemon 55b113257c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
PostgreSQL Daemon 969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Tom Lane e181001764 Small fix to Christopher's recent improvements --- underscore is not
a special character in regexes, but it is for LIKE, so NOT LIKE 'pg_%'
is incorrect.  Need NOT LIKE 'pg\_%'.
2003-10-31 03:58:15 +00:00
Bruce Momjian 3c9a32d4a2 Fix two bugs in funcs.source that made the tutorial script fail.
Make a LOT of fixes to syscat.source to:

* Set search_path properly (and reset it)
* Add schema name to all results
* Add schema name to ORDER BY first
* Make checks for user-defined objects match reality
* format_type all type names
* Respect attisdropped
* Change !~ to 'not like' since it's more standard


Christopher Kings-Lynne
2003-10-26 04:51:51 +00:00
Tom Lane 6fbb14a174 Update the complex-datatype example to V1 function calling conventions,
and add binary send/receive functions.  Fix some other grottiness such
as failure to mark the C functions STRICT.
2003-10-21 22:51:14 +00:00
Tom Lane 2f9c859ea1 Fix some copyright notices that weren't updated. Improve copyright tool
so it won't miss 'em again.
2003-08-04 23:59:41 +00:00
Bruce Momjian f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Tom Lane e8db9b26d0 elog mop-up. 2003-07-27 17:10:07 +00:00
Tom Lane fc8d970cbc Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
2003-05-28 16:04:02 +00:00
Peter Eisentraut 337da0678a Assorted fixes for Cygwin:
Eliminate the mysterious games that the Cygwin build plays with the linker
flag variables.  DLLLIBS is gone, use SHLIB_LINK like everyone else.
Detect cygipc in configure, after the linker flags are set up, otherwise
configure might not work at all.

Make sure everything is covered by make clean.

Fix the build of the new conversion procedure modules.

Add new DLLIMPORT markers where required.

Finally, the compiler complains if we use an explicit
-I/usr/local/include, so don't do that.  Curiously, -L/usr/local/lib is
still necessary.
2002-09-05 18:28:46 +00:00
Tom Lane b663f3443b Add a bunch of pseudo-types to replace the behavior formerly associated
with OPAQUE, as per recent pghackers discussion.  I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
2002-08-22 00:01:51 +00:00
Tom Lane 937aef3545 Ensure that src/tutorial gets cleaned by top-level make clean. 2002-07-30 17:47:58 +00:00
Tom Lane c2d0ebce75 Rewrite xindex.sgml for CREATE OPERATOR CLASS. catalogs.sgml finally
contains descriptions of every single system table.  Update 'complex'
tutorial example too.
2002-07-30 05:24:56 +00:00
Bruce Momjian d84fe82230 Update copyright to 2002. 2002-06-20 20:29:54 +00:00
Tom Lane 27a54ae282 Opclasses live in namespaces. I also took the opportunity to create
an 'opclass owner' column in pg_opclass.  Nothing is done with it at
present, but since there are plans to invent a CREATE OPERATOR CLASS
command soon, we'll probably want DROP OPERATOR CLASS too, which
suggests that a notion of ownership would be a good idea.
2002-04-17 20:57:57 +00:00
Tom Lane a521d5a25e Update obsolete syntax in example of inheritance. 2002-04-11 21:18:50 +00:00
Tom Lane 902a6a0a4b Restructure representation of aggregate functions so that they have pg_proc
entries, per pghackers discussion.  This fixes aggregates to live in
namespaces, and also simplifies/speeds up lookup in parse_func.c.
Also, add a 'proimplicit' flag to pg_proc that controls whether a type
coercion function may be invoked implicitly, or only explicitly.  The
current settings of these flags are more permissive than I would like,
but we will need to debate and refine the behavior; for now, I avoided
breaking regression tests as much as I could.
2002-04-11 20:00:18 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Tom Lane 8dcf998dd1 Remove no-longer-needed dependencies on DLSUFFIX. 2001-10-26 20:45:33 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Tom Lane 2e5fda7b7e DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax
'aggname (aggtype)'.  The old syntax 'aggname aggtype' is still accepted
for backwards compatibility.  Fix pg_dump, which was actually broken for
most cases of user-defined aggregates.  Clean up error messages associated
with these commands.
2001-10-03 20:54:22 +00:00
Peter Eisentraut 60ce9e9279 New blood and fresh air for tutorial 2001-09-02 23:27:50 +00:00
Tom Lane f933766ba7 Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in
pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
index AM, not a row for each opclass name.  This allows pg_opclass to show
directly whether an AM supports an opclass, and furthermore makes it possible
to store additional information about an opclass that might be AM-dependent.
pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
previously expected the user to remember to provide in CREATE INDEX commands.
Lossiness is no longer an index-level property, but is associated with the
use of a particular operator in a particular index opclass.

Along the way, IndexSupportInitialize now uses the syscaches to retrieve
pg_amop and pg_amproc entries.  I find this reduces backend launch time by
about ten percent, at the cost of a couple more special cases in catcache.c's
IndexScanOK.

Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.

initdb forced.
2001-08-21 16:36:06 +00:00
Tom Lane de4dc29a20 Fix Cygwin build, per Jason Tishler. 2001-08-09 13:52:06 +00:00
Tom Lane c74dc1281f Update some obsolete examples. 2001-06-13 19:31:56 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Tom Lane d08741eab5 Restructure the key include files per recent pghackers discussion: there
are now separate files "postgres.h" and "postgres_fe.h", which are meant
to be the primary include files for backend .c files and frontend .c files
respectively.  By default, only include files meant for frontend use are
installed into the installation include directory.  There is a new make
target 'make install-all-headers' that adds the whole content of the
src/include tree to the installed fileset, for use by people who want to
develop server-side code without keeping the complete source tree on hand.
Cleaned up a whole lot of crufty and inconsistent header inclusions.
2001-02-10 02:31:31 +00:00
Bruce Momjian 623bf843d2 Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group. 2001-01-24 19:43:33 +00:00
Tom Lane 5bb2300b59 Revise handling of oldstyle/newstyle functions per recent discussions
in pghackers list.  Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention.  pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'.  A newstyle function must be identified
by an associated info routine.  See src/backend/utils/fmgr/README.
2000-11-20 20:36:57 +00:00
Peter Eisentraut 805e431a38 Add support for VPATH builds, that is, building somewhere else than in the
source directory.  This involves mostly makefiles using $(srcdir) when they
might have used ".".  (Regression tests don't work with this, yet.)

Sort out usage of CPPFLAGS, CFLAGS (and CXXFLAGS).  Add "override" keyword
in most places, to preserve necessary flags even when the user overrode the
flags.
2000-10-20 21:04:27 +00:00
Peter Eisentraut 424f0edcb8 Fix relative path references so that make knowns which dependencies refer
to one another. Sort out builddir vs srcdir variable namings. Remove some
now obsoleted make variables.
2000-08-31 16:12:35 +00:00
Tom Lane d9eb7d8fa1 Update funcs tutorial for new function manager. 2000-08-24 23:32:43 +00:00
Tom Lane bec98a31c5 Revise aggregate functions per earlier discussions in pghackers.
There's now only one transition value and transition function.
NULL handling in aggregates is a lot cleaner.  Also, use Numeric
accumulators instead of integer accumulators for sum/avg on integer
datatypes --- this avoids overflow at the cost of being a little slower.
Implement VARIANCE() and STDDEV() aggregates in the standard backend.

Also, enable new LIKE selectivity estimators by default.  Unrelated
change, but as long as I had to force initdb anyway...
2000-07-17 03:05:41 +00:00
Tom Lane ae526b4070 Another round of updates for new fmgr, mostly in the datetime code. 2000-06-09 01:11:16 +00:00
Tom Lane 091126fa28 Generated header files parse.h and fmgroids.h are now copied into
the src/include tree, so that -I backend is no longer necessary anywhere.
Also, clean up some bit rot in contrib tree.
2000-05-29 05:45:56 +00:00
Tom Lane 1f7ba1ebaf Fix some bogosity in the tutorial examples. 2000-03-28 02:49:19 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00
Tom Lane 0dbffa704a First cut at making useful selectivity estimates for range queries
(ie, WHERE x > lowbound AND x < highbound).  It's not very bright yet
but it does something useful.  Also, rename intltsel/intgtsel to
scalarltsel/scalargtsel to reflect usage better.  Extend convert_to_scalar
to do something a little bit useful with string data types.  Still need
to make it do something with date/time datatypes, but I'll wait for
Thomas's datetime unification dust to settle first.  Eventually the
routine ought not have any type-specific knowledge at all; it ought to
be calling a type-dependent routine found via a pg_type column; but
that's a task for another day.
2000-01-24 07:16:52 +00:00
Tom Lane 71ed7eb494 Revise handling of index-type-specific indexscan cost estimation, per
pghackers discussion of 5-Jan-2000.  The amopselect and amopnpages
estimators are gone, and in their place is a per-AM amcostestimate
procedure (linked to from pg_am, not pg_amop).
2000-01-22 23:50:30 +00:00
Bruce Momjian 3406901a29 Move some system includes into c.h, and remove duplicates. 1999-07-17 20:18:55 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +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 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Bruce Momjian 344190b7ef Fixup for src/tutorial/func.c and src/tutorial/func.source
Removed char16 and replaced with an example using Point
as suggested by Tom Lane.  The dept field was changed to
the cubicle field denoting the row(x) and column(y) of
the employee's cube in the corporate jungle.  The C function
builds a 'compromise' cubicle from two suggested ones.

I'll try and patchup the documentation next.

Clark
1999-03-14 15:22:15 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Bruce Momjian fa1a8d6a97 OK, folks, here is the pgindent output. 1998-09-01 04:40:42 +00:00
Bruce Momjian af74855a60 Renaming cleanup, no pgindent yet. 1998-09-01 03:29:17 +00:00
Bruce Momjian 6df719184c Fix spelling of "including
Edward J. Huff
1998-03-20 04:12:25 +00:00
Marc G. Fournier 207acd86d7 From: Darren King <darrenk@insightdist.com>
1. Make 'all' works without complaint.  Don't have to add the .exp
   files to the files list.  They are made automagically when
   making the respective shared lib file.

   Only port that actually uses EXPSUFF (from makefiles/Makefile.*)
   is Aix, so if this breaks anybody else, let me know, asap.

2. Make 'clean' actually cleans up correctly.  Previously, it would
   leave the .o files in C-code directory.

3. Changed references to reflect new location of .c files.

4. Added DELETE statements to complex.source so that it tidies up
   when done.  Previously, it would leave things in pg_amop,
   pg_amproc and pg_opclass.  Only possible to do this with the
   new SUBSELECT code in 6.3.  Nice work, fellas...

   Not deleting the index entries would cause a non-fatal error if
   complex.sql was run again on the same database.  Much tidier now.

5. Corrected the README.  obj directory hasn't existed since Bryan
   redid the make way back when.  Also changed the snipet from psql
   to match the current version. POSTGRES95?!?  I don't think so. :)
1998-03-01 04:52:59 +00:00
Marc G. Fournier f3f7712675 Move around files before applying Darren's second patch 1998-03-01 04:51:16 +00:00
Marc G. Fournier 5b3e78afe3 From: Darren King <darrenk@insightdist.com>
Seem to remember someone posting to one of the lists a while back
that the tutorial code wouldn't compile and/or run.  Found four
problems with it that will let it run.

1. Tutorial makefile had a recursive use of DLOBJS.

2. Some tutorial needed semi-colons added to many statements.

3. Complex tutorial didn't clean up after itself.

4. Advanced had a time-travel example.  Commented it out and
   put a line pointing the user to contrib/spi/README.
1998-02-28 23:37:10 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Thomas G. Lockhart 9e22f82562 Fix typos in SQL statement terminators. 1998-02-11 03:51:38 +00:00
Bruce Momjian 679d39b9c8 Goodbye ABORT. Hello ERROR for all errors. 1998-01-07 21:07:04 +00:00
Bruce Momjian 0d9fc5afd6 Change elog(WARN) to elog(ERROR) and elog(ABORT). 1998-01-05 03:35:55 +00:00
Marc G. Fournier 0aa928764a Various fixes NETBSD/sparc related
From: Tom I Helbekkmo <tih@Hamartun.Priv.NO>
1998-01-04 19:13:04 +00:00
Bruce Momjian 3f365ba0fc Inline memset() as MemSet(). 1997-09-18 20:22:58 +00:00
Bruce Momjian 59f6a57e59 Used modified version of indent that understands over 100 typedefs. 1997-09-08 21:56:23 +00:00
Bruce Momjian 319dbfa736 Another PGINDENT run that changes variable indenting and case label indenting. Also static variable indenting. 1997-09-08 02:41:22 +00:00
Bruce Momjian 1ccd423235 Massive commit to run PGINDENT on all *.c and *.h files. 1997-09-07 05:04:48 +00:00
Bruce Momjian edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Bruce Momjian c666255112 Typo changes in tests/ examples. 1997-06-25 19:59:57 +00:00
Bryan Henderson 7bfb924aea Silence compiler warnings, fix error in complex compare function. 1997-01-05 21:20:34 +00:00
Bryan Henderson 227015b08e Standardize all LDADD to LD_ADD. 1997-01-05 21:17:45 +00:00
Bruce Momjian 221d7296aa Here is a bug fix and some spelling changes for the complex number tutorial
code. I have also written a complete complex number package based on this
tutorial; I will submit this as a contribution soon. Is there a particular
format for contributed tar files? I have a C source file, two SQL files, and a
Makefile.

Thomas Lockhart
1996-12-28 02:22:12 +00:00
Bruce Momjian 317f375bb2 Rename SLSUFF to DLSUFFIX 1996-11-18 06:07:56 +00:00
Bryan Henderson b20766ccc4 Eliminate MKDIR, srcdir, objdir. Centralize setting of LIBPQDIR. 1996-11-13 10:36:36 +00:00
Bryan Henderson d7dd9295b7 End of the make file simplifications. 1996-11-12 11:43:32 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00