Commit Graph

1848 Commits

Author SHA1 Message Date
Bruce Momjian 034895125d > > > > > - PostgreSQL requires to be compiled with --enable-multibyte
> > > > >   and --enable-unicode-convertion if it ought to work correctly
> > > > >   with Tcl/Tk >= 8.1 (client or server side).
> > > > >
> > > > > - PL/Tcl needs to be changed to use pg_do_encoding_conversion
> > > > >   if it runs on a Tcl version >= 8.1 .
> > >
> > > > I'll do pl/tcl part in the next version of patch. Using this approach we
> > > > can eliminate overhead for databases in UNICODE.
> > >
> > > Any progress on this?  I'd prefer to get rid of this --enable-pltcl-utf
> > > option before release.
> >
> > Done
> >
> > Next version removes --enable-pltcl-utf switch and enables embedded
> > utf conversion of pgsql if tcl version >=8.1 and --enable-unicode-conversion
2001-10-01 15:33:31 +00:00
Tom Lane cdd9146863 The trailing semicolon in a plpgsql function definition is now optional.
Per gripe 9/26.
2001-09-26 21:35:28 +00:00
Peter Eisentraut 264f8f2b6c Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
2001-09-16 16:11:11 +00:00
Bruce Momjian 148f94b98f I noticed that plpython does not make the relid available inside
a trigger the way that pltcl does.

Here's a little patch that adds it in.

-Brad McLean
2001-09-12 03:03:25 +00:00
Bruce Momjian 16910e44de Next version of patch.
Now with documentation update and disabling of UTF conversion for Tcl <=8.0

On Fri, 24 Aug 2001, Vsevolod Lobko wrote:

> On Thu, 23 Aug 2001, Tom Lane wrote:
>
> > > Is this looks better?
> >
> > It does, but one small gripe: the lack of semicolons will probably cause
> > pg_indent to mess up the indentation.  (I know emacs' autoindent mode
> > will not work nicely with it, either.)  Please set up the macros so that
> > you write
> >
> >                         UTF_BEGIN;
> >                         Tcl_DStringAppend(&unknown_src, UTF_E2U(part), -1);
> >                         UTF_END;
> >
> > and then I'll be happy.
>
> Attached revised patch
>
> > Your point about overhead is a good one, so I retract the gripe about
> > using a configure switch.  But please include documentation patches to
> > describe the configure option in the administrator's guide (installation
> > section).
>
> This patch still uses configure switch for enabling feature.
>
> For enabling based on tcl version we have 2 posibilites:
>  1) having feature enabled by default, but in pltcl.c check for tcl
>     version and disable it for old versions
>  2) enable or disable at configure time based on tcl version, but there
>     are problem - current configure don't checks for tcl version at all
>     and my configure skills not enought for adding this
>

Vsevolod Lobko
2001-09-06 02:56:32 +00:00
Peter Eisentraut 42ae4f2940 Turn on plpython build by default if we have something that looks like a
shared library, or we can do without one.
2001-08-27 00:29:49 +00:00
Peter Eisentraut 34fd50880f VPATH and DESTDIR support for PL/Perl, using the same techniques employed
in interfaces/perl5 a brief while ago.

Also, since building PL/Perl without a shared libperl actually works on
some platforms we can enable it there to get some development happening.
I've only checked off linux right now, but others should be added in the
future.
2001-08-26 23:54:41 +00:00
Peter Eisentraut 1837f8cbdf Add -Wno-error because of "unclean" flex output. 2001-08-21 16:25:21 +00:00
Tom Lane 42fbb6dbe7 Clean up various memory leaks within plpgsql, and re-enable the
exec_eval_simple_expr shortcut, which was diked out in 7.1 because it
leaked too much space.  CVS tip now leaks no memory in Chris Ruprecht's
example, which formerly leaked to the tune of 500 MB.  (Much of this
is work that Jan already did; this commit just cleans up around the
edges.)
2001-08-02 21:31:23 +00:00
Bruce Momjian 84d2c518fe I noticed that pltcl didn't have any way to get to SPI_lastoid like plpgsql does.. I started using pltcl a lot because I like to decide when and how my queries get planned.. so I put one together really quick
Sorry I don't have the original around to make a quick diff, but its a very small change... I think this should be in the next release, there's no reason not to have it.

its a function with no expected arguments, so you can use it like:
spi_exec "INSERT INTO mytable(columns...) VALUES(values..)"
set oid [spi_lastoid]
spi_exec "SELECT mytable_id from mytable WHERE oid=$oid"

It just didn't make sense for me to use plpgsql and pltcl, or just screw
them both and use SPI from C.


bob@redivi.com
2001-08-02 15:45:55 +00:00
Bruce Momjian 5c4d1398a6 Back out SET AUTHORIZATION patch until security is resolved. 2001-07-12 17:42:08 +00:00
Bruce Momjian 09523c90fa Make code malloc memory of proper length. 2001-07-12 01:19:40 +00:00
Bruce Momjian d946b2083a I updated the patch to use the SET AUTHORIZATION { INVOKER | DEFINER }
terminology. Also, the function owner is now determined and saved at compile
time (no gotchas here, right?)/

Mark Volpe
2001-07-11 18:54:19 +00:00
Peter Eisentraut 8237d89c0f Support fake root install, separate build dir, dependency tracking, our
choice of compiler and flags, uninstall, and peculiar Python installation
layouts for PyGreSql.  Also install into site-packages now, as officially
recommended.  And pgdb.py is also installed now, used to be forgotten.
2001-07-10 16:33:02 +00:00
Bruce Momjian f5d0c6cad5 Apparently, on some systems, ExtUtils::Embed and MakeMaker are slightly
broken, and its impossible to make a shared library when compiling with
both CCDLFLAGS and LDDLFAGS, you have to pick one or the other.

Alex Pilosov
2001-06-20 00:26:06 +00:00
Bruce Momjian 0ed7864d68 Well, after persuading cvsup and cvs that it _is_ possible to have local
modifiable repositories, I have a clean untrusted plperl patch to offer
you :)

Highlights:
* There's one perl interpreter used for both trusted and untrusted
procedures. I do think its unnecessary to keep two perl
interpreters around. If someone can break out from trusted "Safe" perl
mode, well, they can do what they want already. If someone disagrees, I
can change this.

* Opcode is not statically loaded anymore. Instead, we load Dynaloader,
which then can grab Opcode (and anything else you can 'use') on its own.

* Checked to work on FreeBSD 4.3 + perl 5.5.3 , OpenBSD 2.8 + perl5.6.1,
RedHat 6.2 + perl 5.5.3

* Uses ExtUtils::Embed to find what options are necessary to link with
perl shared libraries

* createlang is also updated, it can create untrusted perl using 'plperlu'

* Example script (assuming you have Mail::Sendmail installed):
create function foo() returns text as '
         use Mail::Sendmail;

         %mail = ( To      => q(you@yourname.com),
                   From    => q(me@here.com),
                   Message => "This is a very short message"
                  );
         sendmail(%mail) or die $Mail::Sendmail::error;
return          "OK. Log says:\n", $Mail::Sendmail::log;
' language 'plperlu';

Alex Pilosov
2001-06-18 21:40:06 +00:00
Tom Lane 7c106621de Fix a few missed NOIND usages. 2001-06-09 02:19:07 +00:00
Jan Wieck ce62c8b10e Patch from Ian Lance Taylor fixing multiple cursor arguments
and buffer zero termination.

Jan
2001-06-06 18:54:41 +00:00
Tom Lane 7748e9e7e5 pltcl, plperl, and plpython all suffer the same bug previously fixed
in plpgsql: they fail for datatypes that have old-style I/O functions
due to caching FmgrInfo structs with wrong fn_mcxt lifetime.

Although the plpython fix seems straightforward, I can't check it here
since I don't have Python installed --- would someone check it?
2001-06-01 18:17:44 +00:00
Bruce Momjian c9a001a11e Allow IS and FOR in Pl/PgSQL cursors, per Oracle and ANSI. Jan-approved. 2001-05-31 17:15:40 +00:00
Tom Lane a056f14be0 Cause plpgsql's PERFORM to behave according to its documentation,
which says that PERFORM will execute any SELECT query and discard the
result.  The former implementation would in fact raise an error if the
result contained more than one row or more than one column.

Also, change plpgsql's error-logging mechanism to emit the additional
messages about error location at NOTICE rather than DEBUG level.  This
allows them to be seen by the client without having to dig into the
postmaster log file (which may be nonexistent or inaccessible by the
client).
2001-05-28 19:33:24 +00:00
Bruce Momjian 06a8346c84 See attached for a small patch that enables plpython to build cleanly
under Cygwin.  This patch together with my previous Python patch:

    http://postgresql.readysetnet.com/mhonarc/pgsql-patches/2001-05/msg00075.htm
l

enables full Python support (i.e., configure --with-python) for Cygwin
PostgreSQL.

Jason Tishler
2001-05-25 15:48:33 +00:00
Bruce Momjian f3c1ae58f2 Another Makefile fix for qnx patch. 2001-05-25 04:26:21 +00:00
Bruce Momjian 248a5a7257 Fix tabs in Makefile. 2001-05-25 04:24:33 +00:00
Bruce Momjian a1f14d30b1 Back out qnx plpgsql/Makefile change and move to src/Makefile. 2001-05-24 22:33:18 +00:00
Bruce Momjian f36fc7bb63 I haven't tried building postgres with the Watcom compiler for 7.1 because
it does not support 64bit integers. AFAIK that's the default data type for
OIDs, so I am not surprised that this does not work. Use gcc instead.
BTW., 7.1 does not compile as is with gcc either, I believed the
required patches made it into the 7.1.1 release but obviously I missed
the deadline.
Since the ports mailing list does not seem to be archived I have attached
a copy of the patch (for 7.1 and 7.1.1).

I've just performed a build of a Watcom compiled version and found a couple
of bugs in the watcom specific part of that patch. Please use the attached
version instead.

Tegge, Bernd
2001-05-24 15:53:34 +00:00
Jan Wieck d27f363e3f Enhancement of SPI to get access to portals
- New functions to create a portal using a prepared/saved
  SPI plan or lookup an existing portal by name.
- Functions to fetch/move from/in portals. Results are placed
  in the usual SPI_processed and SPI_tuptable, so the entire
  set of utility functions can be used to gain attribute access.
- Prepared/saved SPI plans now use their own memory context
  and SPI_freeplan(plan) can remove them.
- Tuple result sets (SPI_tuptable) now uses it's own memory
  context and can be free'd by SPI_freetuptable(tuptab).

Enhancement of PL/pgSQL

- Uses generic named portals internally in FOR ... SELECT
  loops to avoid running out of memory on huge result sets.
- Support for CURSOR and REFCURSOR syntax using the new SPI
  functionality. Cursors used internally only need no explicit
  transaction block. Refcursor variables can be used inside
  of explicit transaction block to pass cursors between main
  application and functions.


Jan
2001-05-21 14:22:19 +00:00
Jan Wieck 27b0e8c0b0 Adding ELSIF support contributed by Klaus Reger.
Jan
2001-05-18 21:16:59 +00:00
Peter Eisentraut 70aa2ae6a5 Remove linking hacks now that dynloader is fixed. 2001-05-14 22:06:50 +00:00
Peter Eisentraut bbc3920fe9 PL/Python should build portably now, if you can get over the fact that
there's no shared libpython.  Test suite works as well. Also, add some
documentation.
2001-05-12 17:49:32 +00:00
Peter Eisentraut c51b00a213 PL/Python integration: support in create/droplang, add CVS keywords,
remove useless files, beat some sense into Makefile.  For me it builds
and sort of runs, so it's a start.
2001-05-12 01:30:30 +00:00
Peter Eisentraut 5e19e14ecd Cleanups of pltcl unknown thingy. 2001-05-11 23:38:06 +00:00
Bruce Momjian 72c8af51fd Move disabled message up to a higher makefile. 2001-05-10 03:00:11 +00:00
Bruce Momjian 8ace5114dc This directory contains a module that implements the "Metaphone" code as
a PostgreSQL user-defined function.  The Metaphone system is a method of
matching similar sounding names (or any words) to the same code.

Metaphone was invented by Lawrence Philips as an improvement to the popular
name-hashing routine, Soundex.

This metaphone code is from Michael Kuhn, and is detailed at
   http://aspell.sourceforge.net/metaphone/metaphone-kuhn.txt

Joel Burton
2001-05-09 23:00:44 +00:00
Bruce Momjian 91e3b85529 Wow, I am getting good at this Makefile stuff. Peter may be OK with it. 2001-05-09 21:42:29 +00:00
Bruce Momjian a1a12b8a0c I think I got the pltcl Makefile unknown rules working properly. 2001-05-09 21:35:11 +00:00
Bruce Momjian 0007be5da7 More cleanups to generate tcl unknown from Makefile. 2001-05-09 20:30:09 +00:00
Bruce Momjian 36f41c7126 Make tcl unknown configure from Makefile, not configure. 2001-05-09 20:19:30 +00:00
Bruce Momjian 14536f591d More --enable-pltcl-unknown renames. 2001-05-09 20:08:08 +00:00
Bruce Momjian ec9cc733ca Add TODO file. 2001-05-09 19:55:22 +00:00
Bruce Momjian 0bef7ba549 Add plpython code. 2001-05-09 19:54:38 +00:00
Bruce Momjian f7659a9c18 This patch adds a new configure option --with-pltcl-unknown which
enables pltcl unknown support.


Also it adds substituting of tclsh with tclsh that was by configure in
pltcl_*mod scripts. For example, On freebsd, tclsh can be called
tclsh8.2 or
tclsh8.3 depending on installed version of Tcl.

After patching files
  src/pl/tcl/modules/pltcl_listmod
  src/pl/tcl/modules/pltcl_loadmod
  src/pl/tcl/modules/pltcl_delmod
must be renamed(copied,repocopied) to
  src/pl/tcl/modules/pltcl_listmod.in
  src/pl/tcl/modules/pltcl_loadmod.in
  src/pl/tcl/modules/pltcl_delmod.in

seva@sevasoft.kiev.ua
2001-05-09 19:19:00 +00:00
Tom Lane eb62f076d0 Un-break exec_move_row() for case that a NULL tuple and tupdesc are
passed, which occurs when no rows are retrieved by a SELECT.
Mea maxima culpa ... I should have caught this.
2001-05-08 01:00:53 +00:00
Tom Lane 8bb3c8fe54 exec_move_row() should be more forgiving of tuples with a different
number of columns than it was expecting, for reasons that are now
documented in the code...
2001-04-30 20:05:40 +00:00
Tom Lane d5096af2c4 Make the world safe for passing whole rows of views to functions. This
already worked fine for whole rows of tables, but not so well for views...
2001-04-18 20:42:56 +00:00
Tom Lane a3ed622b63 Since plpgsql keeps its compiled function parsetrees until backend exit,
it needs to ensure that data structures attached to fmgr info records in
the trees will stick around that long, too.  Current code was crashing
on cases like datatypes with old-style I/O functions.
2001-04-06 02:06:48 +00:00
Tom Lane 6faf150a30 Fix/cleanup DLLLIBS handling for Cygwin port. If it works it's to
Jason Tishler's credit, if it's broken it's my fault ...
2001-04-04 21:15:56 +00:00
Bruce Momjian 0686d49da0 Remove dashes in comments that don't need them, rewrap with pgindent. 2001-03-22 06:16:21 +00:00
Bruce Momjian 9e1552607a pgindent run. Make it all clean. 2001-03-22 04:01:46 +00:00
Bruce Momjian 296c806dd5 > Applied. Thanks.
One more :)) It's for improper function argumets for
PLTCL_UNKNOWN_SUPPORT code

I'm not an autoconf expert, but is it possible to enable unknown
support in pltcl with configure option ?
This support is really handy for real life usage of pl/tcl.

seva@sevasoft.kiev.ua
2001-03-07 16:18:08 +00:00
Bruce Momjian 3dc1b2b71d pltcl_loadmod has problems with big (>4k) modules because of missing incr
in splitting code:

seva@sevasoft.kiev.ua
2001-03-07 16:09:09 +00:00
Peter Eisentraut cb6edf9d56 Make sure -L and -I's for our source tree are always before system include
or library directories on the command line.
2001-02-20 19:20:30 +00:00
Tom Lane 414f94f262 Change plpgsql's GET DIAGNOSTICS statement to use SQL99-compatible
syntax.  Fix the RESULT_OID case, which never worked.  Add documentation.
2001-02-19 19:49:53 +00:00
Tom Lane a2dafc6416 Fix bugs in pltcl's new return_null command: it was liable to go belly up
if the return datatype's input converter was at all strict, because the
converter would get called on junk data when returning NULL.  Also
ensure that it gives an error rather than coredumping if someone tries
to use it in a trigger function.
2001-02-16 03:26:40 +00:00
Tom Lane 60d1d671a8 Fix erroneous sort request in pltcl selftest. 2001-02-16 03:22:41 +00:00
Bruce Momjian 4ea081e94f Format to match standard conventions 2001-02-10 22:53:40 +00:00
Bruce Momjian b54073ea4c Convert to standard 4-space tabs. 2001-02-10 22:42:01 +00:00
Peter Eisentraut 2660803697 Only look for bison as YACC; other yaccs need to be selected explicitly.
When no suitable YACC is configured, supply useful informational messages
to users.  (Same way flex has been handled for a while.)
2001-02-10 22:31:42 +00:00
Tom Lane dfbd5d6532 plpgsql's private copy of xlateSqlType was out of sync. Again. This
is clearly not maintainable, so dike it out in favor of calling the real
version in the backend's gram.y.
2001-02-09 03:26:28 +00:00
Tom Lane b8cbb8c7e3 Remove no-longer-needed mklang script; now superseded by createlang. 2001-02-09 01:05:42 +00:00
Tom Lane 8a2cdd77ad EXECUTE of a SELECT ... INTO now draws a 'not implemented' error,
rather than executing the INTO clause with non-plpgsql semantics
as it was doing for the last few weeks/months.  This keeps our options
open for making it do the right plpgsql-ish thing in future without
creating a backwards compatibility problem.  There is no loss of
functionality since people can get the same behavior with CREATE TABLE AS.
2001-02-09 00:14:26 +00:00
Tom Lane c9fe128316 Clean up per-tuple memory leaks in trigger firing and plpgsql
expression evaluation.
2001-01-22 00:50:07 +00:00
Bruce Momjian de266c6d73 > > I have attached a simple change to src/pl/plperl/plperl.c to
> > enable the :bash_math opcodes.  Currently plperl.c only
> > enables the :default opcodes.  This leave out about five of six
> > math functions including sqrt().

Travis Bauer
2001-01-19 16:14:36 +00:00
Tom Lane 682b128993 Fix NOT NULL option for plpgsql variables (doesn't look like it
could ever have worked...)
2001-01-06 01:43:01 +00:00
Tom Lane 0ad5e43772 Fix misplaced strdup(), which could lead to error messages referencing
deallocated memory later on.
2001-01-06 01:39:01 +00:00
Tom Lane afeb8c4819 Clean up some unnecessary fragility in EXECUTE command. 2001-01-04 02:38:02 +00:00
Tom Lane 2153d1c106 Remove obsolete and unportable enable_plpgsql script. createlang has
been the supported and documented way to do this for a long time...
2000-12-30 00:50:44 +00:00
Peter Eisentraut f824d4a363 Polish PL/Perl documentation. The README file got shrunk to being a
pointer into the real documentation.
2000-12-19 18:16:26 +00:00
Peter Eisentraut 326fbd8837 List .o file explicitly as dependency, to work around a gmake bug
(intermediate .o file gets deleted and rebuild on next make invocation).
2000-12-15 18:50:35 +00:00
Tom Lane 8d7c0851a3 Improve error message for erroneous use of 'opaque' as plperl argument
or return type.
2000-12-08 00:11:55 +00:00
Tom Lane 6e646c7313 Improve error message for erroneous use of 'opaque' as pltcl argument
or return type.
2000-12-08 00:09:07 +00:00
Tom Lane 74c14995f1 Improve error message for erroneous use of 'opaque' as plpgsql argument
or return type.
2000-12-08 00:03:02 +00:00
Tom Lane a27b691e29 Ensure that all uses of <ctype.h> functions are applied to unsigned-char
values, whether the local char type is signed or not.  This is necessary
for portability.  Per discussion on pghackers around 9/16/00.
2000-12-03 20:45:40 +00:00
Tom Lane f5371feef9 Fix inadequate tree-walking code in exec_eval_clear_fcache. 2000-12-01 20:43:59 +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
Tom Lane a933ee38bb Change SearchSysCache coding conventions so that a reference count is
maintained for each cache entry.  A cache entry will not be freed until
the matching ReleaseSysCache call has been executed.  This eliminates
worries about cache entries getting dropped while still in use.  See
my posting to pg-hackers of even date for more info.
2000-11-16 22:30:52 +00:00
Peter Eisentraut 7301660048 outdated and obsolete 2000-11-03 20:38:42 +00:00
Peter Eisentraut a18490b73d Add global .SECONDARY: target to not allow make to delete intermediate
target files in implicit rule chains.  That might have been a cool idea
but it seems to be too buggy to work, as it caused spurious recompiles in
several places.
2000-11-03 20:27:40 +00:00
Peter Eisentraut 54121b9a8b Pass on all CPPFLAGS that look like -I* to the PL/Perl build.
(This previously worked, but must have gotten lost somewhere...)
2000-11-02 18:40:13 +00:00
Tom Lane f9b2298bb3 Wups, messed up the comment markers on that last change. 2000-10-24 19:31:13 +00:00
Tom Lane c5185e84e8 Update plperl README per suggestions from Edward Bridges. 2000-10-24 17:47:32 +00:00
Tom Lane 0fb5db60e6 Enable plperl to be built when --with-perl is selected. Dunno whether
latest fixes make it safe or not, but we won't find out if no one builds
it, eh?
2000-10-24 17:03:46 +00:00
Tom Lane 1318342b6e Eliminate POLLUTE=1 hack for cross-Perl-version compatibility by using
Devel::PPPort instead.  Thanks to Gilles Darold for doing the legwork.
2000-10-24 17:01:06 +00:00
Peter Eisentraut 7b021ce17c Polish shared library build to reduce number of special hacks. In
particular, allow linking with arbitrary commands rather than only $(AR) or
$(LD), and treat C++ without hacks.

Add option to disable shared libraries.  This takes the place of the
BSD_SHLIB variable.  The regression test driver ignores the plpgsql test
if there are no shared libraries available.
2000-10-23 21:44:12 +00:00
Tom Lane ee28d8b3d5 plpgsql regress tests seem a tad out of date ... repair bit rot. 2000-10-22 23:25:11 +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
Tom Lane 8b6b414a5e Update pltcl regress test to exercise return_null; also make use of
the fact that CREATE FUNCTION and CREATE AGGREGATE now allow array
types to be named like int4[] rather than _int4.
2000-10-17 21:23:09 +00:00
Peter Eisentraut f428d053ce Revise Tcl/Tk configuration. Make missing Tcl after --with-tcl an error,
add --without-tk option to disable Tk.  We don't need the AC_PATH_XTRA
test because tkConfig.sh already contains all the information about how to
compile and link with X.  Also make sure that libpq is up to date for
libpgtcl.  Remove executable bits from pgaccess.sh, but add it to pgaccess.
2000-09-25 22:23:01 +00:00
Bruce Momjian 516aac42f9 disable plperl again. 2000-09-25 12:43:24 +00:00
Peter Eisentraut 335248c9b7 Support for DESTDIR make variable. This is used as in `make install
DESTDIR=/else/where' and prepends the value of DESTDIR to the full
installation paths (e.g., /else/where/usr/local/pgsql/bin). This allows
users to install the package into a location different from the one that
was configured and hard-coded into various scripts, e.g., for creating
binary packages.

DESTDIR is in many cases preferrable over `make install
prefix=/else/where' because

a) `prefix' affects the path that is hard-coded into the files, which can
lead to a `make install prefix=xxx' (as done by the regression test
driver) corrupting the files in the source tree with wrong paths.

b) it doesn't work at all if a directory was overridden to not depend on
`prefix', e.g., --sysconfdir=/etc.

(Updating the regression test driver to use DESTDIR is a separate
undertaking.)

See also autoconf@gnu.org, From: Akim Demaille <akim@epita.fr>, Date: 08
Sep 2000 12:48:59 +0200, Message-ID:
<mv4em2vb1lw.fsf@nostromo.lrde.epita.fr>, Subject: Re: HTML format
documentation.
2000-09-17 13:02:52 +00:00
Tatsuo Ishii 148f905f41 Allow PL/pgSQL accept non ascii identifiers 2000-09-15 11:59:40 +00:00
Tom Lane 3bfbe6991a Clean up compiler warning. 2000-09-12 19:41:40 +00:00
Bruce Momjian 5c6fa5ee32 This patch, when applied in src/pl will unbreak plperl in
7.0.2 release. Sorry, if that's fixed ages ago - I don't track
development versions of PostgreSQL.

Patch is just a little bit tested (some valid functions created and
successfully run as well as some erroneous ones created and emitted proper
error messages when used).

My platform is FreeBSD 5.0-CURRENT (with perl 5.6.0 provided in the
base system).

Alex Kapranoff
2000-09-12 04:28:30 +00:00
Jan Wieck c59077dd7b GET DIAGNOSTICS statement to PL/pgSQL to access SPI_processed
and SPI_return values. Patch from Philip Warner.

Jan
2000-09-05 09:02:18 +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
Jan Wieck d4266620e1 Added EXECUTE command to PL/pgSQL for execution of
dynamic SQL and utility statements.

Jan
2000-08-31 13:26:16 +00:00
Peter Eisentraut f03fc94e7d New configure test for flex, which recognizes only flex but does so in all
incarnations (I hope). When an acceptable flex version is not found, print
instructive error messages from both configure and the makefiles, so that
users can continue building anyway.
2000-08-28 11:53:23 +00:00
Tom Lane 782c16c6a1 SQL-language functions are now callable in ordinary fmgr contexts ...
for example, an SQL function can be used in a functional index.  (I make
no promises about speed, but it'll work ;-).)  Clean up and simplify
handling of functions returning sets.
2000-08-24 03:29:15 +00:00
Tom Lane f9b2f9bb76 Fix plpgsql lexer to accept Windows-style and Mac-style newlines as
newlines.
2000-08-22 14:59:28 +00:00
Tom Lane 37168b8da4 Clean up handling of variable-free qual clauses. System now does the
right thing with variable-free clauses that contain noncachable functions,
such as 'WHERE random() < 0.5' --- these are evaluated once per
potential output tuple.  Expressions that contain only Params are
now candidates to be indexscan quals --- for example, 'var = ($1 + 1)'
can now be indexed.  Cope with RelabelType nodes atop potential indexscan
variables --- this oversight prevents 7.0.* from recognizing some
potentially indexscanable situations.
2000-08-13 02:50:35 +00:00
Tom Lane c298d74d49 More functions updated to new fmgr style --- money, name, tid datatypes.
We're reaching the mopup stage here (good thing too, this is getting
tedious).
2000-08-03 16:35:08 +00:00
Peter Eisentraut 32163099d7 Add distprep target to take some of the job of the release_prep script.
The latter updated accordingly. Also add `dist' and `distcheck' targets
to play with, but caveat packager.

Updated backend/bootstrap and backend/parser makefile to make them
marginally builddir aware and fix the usual set of things.

Add rule to automatically remake config.h dependent on config.h.in and
config.status. (Adopted from Autoconf manual and about every other
package.) On a good day we should now have a complete and accurate set
of dependencies throughout everything.
2000-07-19 16:30:27 +00:00
Jan Wieck 79e6648649 Added untrusted PL/TclU (pltclu) language. Executes all procedures
in a non-safe interpreter, so with full OS access! Language is
restricted to be used by DB superusers.

Added "argisnull n" and "return_null" commands to gain full control
over NULL values from new FMGR capabilities.

Jan
2000-07-19 11:53:02 +00:00
Jan Wieck ec1ea5295a Fixed an ordering problem in test queries and
formatting differences due to new psql.

Jan
2000-07-18 11:28:20 +00:00
Tom Lane 8b1b34f6c0 Update pltcl regress test's expected output for 7.0 psql output format.
NOTE: this implementation of tcl_avg() fails with 'divide by zero'
for zero input rows.  It ought to return NULL, but pltcl does not
currently provide a way to do that, so I'm leaving the problem unsolved
for now.
2000-07-18 04:45:59 +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 139f19c302 update pltcl test to have at least some chance of running ... still
seems to be busted though ...
2000-07-17 02:22:50 +00:00
Tom Lane a2c6bf5a59 pltcl seems to be broken on HPUX with recent Tcl versions, because
link needs to specify -lc but doesn't.  Quick hack to make it better.
2000-07-17 01:26:42 +00:00
Tom Lane badce86a2c First stage of reclaiming memory in executor by resetting short-term
memory contexts.  Currently, only leaks in expressions executed as
quals or projections are handled.  Clean up some old dead cruft in
executor while at it --- unused fields in state nodes, that sort of thing.
2000-07-12 02:37:39 +00:00
Tom Lane 40f64064ff Update textin() and textout() to new fmgr style. This is just phase
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
2000-07-05 23:12:09 +00:00
Peter Eisentraut 191870388d A little bit of clean-up/bug fix in Tcl build. Handle gracefully cases
where someone wants to build these but hasn't configured for Tcl.
2000-07-01 15:02:31 +00:00
Peter Eisentraut 385470f8c6 Fixes for Solaris/cc suggested by <pgsql-hackers@thewrittenword.com>
Don't use DISABLE_COMPLEX_MACRO on Solaris. Don't define the
replacement function in the header file. Use -KPIC, not -K PIC.
Use CC to link C++ libraries, not ld/ar.

Eliminate file not found warnings in tcl build code.
2000-06-30 16:11:02 +00:00
Peter Eisentraut 44f64dd3ea Makefile cleanup for interface tree. Now essentially with all the
standard targets and behaviour. Replaced Makefile.in's with
Makefile's and declared the respective variables in Makefile.global.

maintainer-clean target now available at top level, although it does
not work in the backend tree yet.

Cleanup pass over Makefile.shlib, renamed some targets and variables.
The shared library symlink tests are now done by make, not the shell.

ecpg: Remove one warning in sloppy flex output.

PL/Perl and Perl interface: the MakeMaker documentation is confusing,
the realclean target *does* "delete derived files", but it also
uninstalls them. Don't use that.

The submake targets in the various bin directories that update libpq
should `make all', not `make libpq.a'. That is a) unportable, and
b) doesn't build the shared library.
2000-06-28 18:30:16 +00:00
Peter Eisentraut 5bb8b62983 Makefile cleanup for bin and pl subtrees. They should now support
all the standard semantics. Also get rid of Makefile.in's on the
way and instead declare all variables in Makefile.global.
2000-06-27 00:32:06 +00:00
Peter Eisentraut bfdb695b85 Cleaned up PL/pgSQL build. Fixed a couple of copyandpaste'os in the
interfaces and interfaces/odbc make files. Adjusted regression test
driver to start building and installing in the top level directory.
2000-06-20 16:40:19 +00:00
Peter Eisentraut 1652d43358 Remove fmgrstamp-h business -- not needed and confusing
Add options to configure to automatically build for Kerberos
support; no more editing of make files.
2000-06-17 00:10:40 +00:00
Peter Eisentraut 44d1abebb4 Big warnings cleanup for Solaris/GCC. Down to about 40 now, but
we'll get there one day.

Use `cat' to create aclocal.m4, not `aclocal'. Some people don't
have automake installed.

Only run the autoconf rule in the top-level GNUmakefile if the
invoker specified `make configure', don't run it automatically
because of CVS timestamp skew.
2000-06-14 18:18:01 +00:00
Bruce Momjian 64948dbe15 >> What happened to the patch I sent regarding the bug in the TCL
>> Makefile where the make bombs if "." is not in the builder's path?
>> The last I checked, it wasn't applied and the fix is very easy
>> (explicitly use "./" to call the script).

 SL Baur
2000-06-12 02:23:52 +00:00
Peter Eisentraut 6de89c9ab7 Moved the intricacies of the perl interface build into its own makefile
that now functions as a wrapper around the MakeMaker stuff. It might
even behave sensically when we have separate build dirs. Same for plperl,
which of course still doesn't work very well. Made sure that plperl
respects the choice of --libdir.

Added --with-python to automatically build and install the Python interface.
Works similarly to the Perl5 stuff.

Moved the burden of the distclean targets lower down into the source tree.
Eventually, each make file should have its own.

Added automatic remaking of makefiles and configure. Currently only for the
top-level because of a bug(?) in Autoconf. Use GNU `missing' to work around
missing autoconf and aclocal. Start factoring out macros into their own
config/*.m4 files to increase readability and organization.
2000-06-10 18:02:12 +00:00
Peter Eisentraut e3059fc0f5 Gen_fmgrtab.sh is strange: it is a platform dependent way (because it uses
CPP) to create platform independent files. Unfortunately, that means that
every config.status (or configure) run invariably causes a relink of the
postmaster and also that we can't put these files in the distribution
(usefully). So we make it a little smarter: when the output files already
exist and it notices that it would recreate them in identical form, it
doesn't touch them. In order to avoid re-running the make rule all the time
we update a timestamp file instead.

Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that
is detected at configure time, not necessarily named `awk' and have it check
for exit statuses a little better.

In other news... Remove USE_LOCALE from the templates, it was set to `no'
everywhere anyway. Also remove YACC and YFLAGS from the templates, configure
is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that
instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules
that need this flag should explicitly invoke it. YFLAGS should be a user
variable. Update the makefiles to that effect.
2000-06-07 16:27:00 +00:00
Peter Eisentraut 5b9d0d9a5c Moved configure script from src/ to the top level directory. Moved
configuration helper things into config/ dir. Adjusted some relative paths
in makefiles.
2000-06-06 22:01:15 +00:00
Tom Lane 48165ec226 Latest round of fmgr updates. All functions with bool,char, or int2
inputs have been converted to newstyle.  This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters.  Still
more to do for the Alpha port however.
2000-06-05 07:29:25 +00:00
Tom Lane 0f1e39643d Third round of fmgr updates: eliminate calls using fmgr() and
fmgr_faddr() in favor of new-style calls.  Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-05-30 04:25:00 +00:00
Bruce Momjian 6c944bf3cc Cleanup of <> and "" 2000-05-29 21:25:07 +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 18952f6744 Second round of fmgr changes: triggers are now invoked in new style,
CurrentTriggerData is history.
2000-05-29 01:59:17 +00:00
Tom Lane 0a7fb4e918 First round of changes for new fmgr interface. fmgr itself and the
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
2000-05-28 17:56:29 +00:00
Tom Lane ac6637485b Transmit -I switches selected by configure (particularly those from
--with-includes) to makefiles for pltcl and plperl, so that these
switches will be used even though we do not want other top-level
CFLAGS.  Ain't it fun trying to support multiple-compiler platforms?
2000-05-23 02:12:46 +00:00
Tom Lane aca5b34427 Cast parameters to ckfree to (char *) to suppress compiler warnings. 2000-05-23 01:59:05 +00:00
Bruce Momjian b1b9059427 Irix fixes from Murad Nayal 2000-05-22 23:56:44 +00:00
Bruce Momjian 992e7dd4e3 Oops, plpgsql didn't have the datetime->timestamp and timespan->interval
mappings.  In fact, it had them backward because it was using the 6.5.*
code.  Copied them from parser/gram.y, so it is fixed now.  Looks like
our first 7.0.1 fix.  Oops, seems Tom has beat me to it as I was typing
this.
2000-05-11 04:00:00 +00:00
Tom Lane 45cc0e9b27 plpgsql RAISE statement was careless about the possibility of a NULL
field value being displayed; produced coredump instead of the expected
<NULL> display.
2000-04-28 00:12:44 +00:00
Tom Lane 3ddeba7403 pltcl didn't work well at all when Tcl had been built with a different
compiler than the one selected to build Postgres with.  It was trying
to feed Postgres-compiler switches to Tcl's compiler.  (Seen this before
with the perl5 interface...) Fix to use only CFLAGS taken from Tcl's
configure information, plus -I which is pretty universal.
2000-04-21 03:28:17 +00:00
Bruce Momjian fe922de3f7 Security fix for plperl. 2000-04-18 15:04:02 +00:00
Tom Lane 94728d1085 Add code to test for non-shared libperl and fail gracefully.
Not a big step forward, but it's something...
2000-04-17 00:49:58 +00:00
Tom Lane 215c60dc21 Show failing OID in 'cache lookup failed' messages;
print OIDs as %u not %d.
2000-04-16 04:19:41 +00:00
Tom Lane 1460dd0eff Show failing OID in 'cache lookup failed' messages. 2000-04-16 04:16:55 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian b09a3b8cab disable plperl 2000-04-11 17:42:28 +00:00
Tom Lane 2ae6e86302 For no good reason at all, libplpgsql was getting linked with libpq.
Since plpgsql is a backend extension, it doesn't need libpq...
2000-04-04 01:47:59 +00:00
Bruce Momjian 081cba45e6 Allow compile to finish even if plperl fails, which it does now. 2000-03-27 22:39:13 +00:00
Tom Lane 0abebf0e7b Remove bogus complexity from build/install of plperl. This stuff was
apparently copied from the makefile for the perl5 interface module,
which needs it for reasons explained in src/interfaces/Makefile.
But none of those reasons apply to plperl.
2000-03-25 19:26:49 +00:00
Bruce Momjian 0dd9558ed7 Add POLLUTE=1 to perl Makefile.PL creations. 2000-03-25 14:25:31 +00:00
Tom Lane 73f5b0847b exec_simple_check_plan() must not allow a plan having initPlans or
subPlans to be considered 'simple'.  This fixes reported problem with
'return exists (select 1 from foo);' in plpgsql function.
2000-03-11 06:19:00 +00:00
Bruce Momjian f43ec05d05 I've made a diff against the 7.0beta1 tree that accomplishes several things:
1) adds NetBSD shared lib support on both ELF and a.out platforms

        2) replaces "-L$(LIBPQDIR) -lpq" with "$(LIBPQ)" defined in
           Makefile.global.  This makes it much easier to build stuff in
           the source tree after you've already installed the libraries.

        3) adds TEMPLATEDIR in Makefile.global that indicates where the
           database templates are stored.  This separates the template files
           from real libraries that are installed in $(LIBDIR).
        4) changes include order of <readline/readline.h> and <readline.h>.
           The latest GNU readline installs its headers under a readline
           subdirectory.

In addition to applying the patch below the following files need to be copied:

        backend/port/dynloader:
                bsd.h -> netbsd.h
                bsd.c -> netbsd.c
        include/port:
                bsd.h -> netbsd.h
        makefiles:
                Makefile.bsd -> Makefile.netbsd

It would be great to see this incorporated into the source tree before
the 7.0 release is cut.

        Thanks!

     -- Johnny C. Lam <lamj@stat.cmu.edu>
2000-03-08 01:58:46 +00:00
Bruce Momjian 19c29f9236 New plperl Makefile. 2000-03-01 19:13:08 +00:00
Tom Lane 1e091ad601 Add 'volatile' declarations to silence gcc warnings about longjmp.
Shouldn't create any portability problems, since we have a configure
test to #define away volatile if the compiler doesn't support it.
2000-02-27 07:18:29 +00:00
Bruce Momjian f40c50627f Fix plpsql for bsdi. 2000-02-23 22:24:46 +00:00
Tom Lane b04b55a9af Clean up temp file in 'make clean'. 2000-02-21 16:46:39 +00:00
Tom Lane 63746a90c1 plperl's makefile tried to use perl's choice of compiler with
postgres's choice of compiler options.  Tres uncool.
2000-02-19 19:02:20 +00:00
Tom Lane fac4f9a698 HP's compiler objects (quite rightly too) to 'static void foo();'
followed by 'extern void foo() { ... }'.
2000-02-19 18:58:37 +00:00
Bruce Momjian a2226ad237 contrib-array.patch
this is an old patch which I have already submitted and never seen
        in the sources. It corrects the datatype oids used in some iterator
        functions. This bug has been reported to me by many other people.

contrib-datetime.patch

        some code contributed by Reiner Dassing <dassing@wettzell.ifag.de>

contrib-makefiles.patch

        fixes all my contrib makefiles which don't work with some compilers,
        as reported to me by another user.

contrib-miscutil.patch

        an old patch for one of my old contribs.

contrib-string.patch

        a small change to the c-like text output functions. Now the '{'
        is escaped only at the beginning of the string to distinguish it
        from arrays, and the '}' is no more escaped.

elog-lineno.patch

        adds the current lineno of CopyFrom to elog messages. This is very
        useful when you load a 1 million tuples table from an external file
        and there is a bad value somehere. Currently you get an error message
        but you can't know where is the bad data. The patch uses a variable
        which was declared static in copy.c. The variable is now exported
        and initialized to 0. It is always cleared at the end of the copy
        or at the first elog message or when the copy is canceled.
        I know this is very ugly but I can't find any better way of knowing
        where the copy fails and I have this problem quite often.

plperl-makefile.patch

        fixes a typo in a makefile, but the error must be elsewhere because
        it is a file generated automatically. Please have a look.

tprintf-timestamp.patch

        restores the original 2-digit year format, assuming that the two
        century digits don't carry much information and that '000202' is
        easier to read than 20000202. Being only a log file it shouldn't
        break anything.

Please apply the patches before the next scheduled code freeze.

I also noticed that some of the contribs don't compile correcly. Should we
ask people to fix their code or rename their makefiles so that they are
ignored by the top makefile?

--
Massimo Dal Zotto
2000-02-13 18:59:53 +00:00
Hiroshi Inoue 5b58de124e Allow SELECT .. FOR UPDATE in PL/pgSQL. 2000-02-07 03:39:13 +00:00
Bruce Momjian c5b02a7a26 Attached is a uuencoded tarball that contains
3 new files and two patches for the plperl subdir.

These changes add the ability for plperl functions
to call 'elog'. It also sets up the frame work to
allow me to add access to the SPI functions.


--
Mark Hollomon
2000-01-29 01:58:50 +00:00
Bruce Momjian 481a7439fb plperl Makefile cleanup. Doesn't work on BSDI yet. 2000-01-20 23:00:40 +00:00
Bruce Momjian 22e7c06506 Update plperl makefile. 2000-01-20 22:31:23 +00:00
Tom Lane 8cfb8c68ea Clean up longstanding warnings. I think the remaining
'defined but not used' warnings would go away if the scanner didn't use
YY_REJECT.
2000-01-20 05:44:34 +00:00
Bruce Momjian c02f1ead48 Well, I finally solved the linking problem
that kept me from making perl secure.

Attached is uuencoded tarball to add PL/perl
to postgresql.

Things I know don't work.
-- triggers
-- SPI


The README file has a _VERY_ short tutorial.

Mark Hollomon
2000-01-20 05:08:58 +00:00
Tom Lane 72cec86235 Add .cvsignore so cvs update doesn't complain about derived
files being left around.
2000-01-17 04:38:49 +00:00
Peter Eisentraut 759fba4873 Included all yacc and lex files into the distribution. 2000-01-16 20:05:00 +00:00
Tom Lane 584e646ad8 Fix a passel of problems with incorrect calls to typinput and typoutput
functions, which would lead to trouble with datatypes that paid attention
to the typelem or typmod parameters to these functions.  In particular,
incorrect code in pg_aggregate.c explains the platform-specific failures
that have been reported in NUMERIC avg().
2000-01-15 22:43:25 +00:00
Tom Lane 6256fcb927 Remove redundant and now-incorrect declaration of pstrdup. 2000-01-14 01:36:42 +00:00
Bruce Momjian 8a093d0ae3 Make number of args to a function configurable. 2000-01-10 17:14:46 +00:00
Bruce Momjian b78769fda2 Fix it's and its to be correct. 2000-01-05 18:23:54 +00:00
Tom Lane 76b110c82a Clean up some minor gcc warnings. 1999-12-20 01:41:32 +00:00
Tom Lane 66dbcd47ed Fix "Unable to identify an operator =$" problem that occurred when pgsql
expressions were written without spaces between operators and operands.
Problem was that something like "if new.f1=new.f2 then" would be translated
to "if $1=$2 then", and the Postgres lexer would tokenize that the wrong
way.  Fix is to emit spaces around $paramno constructs to ensure they are
seen as separate tokens.
1999-11-28 22:02:17 +00:00
Bruce Momjian fc955b14ea Add system indexes to match all caches.
Make all system indexes unique.
Make all cache loads use system indexes.
Rename *rel to *relid in inheritance tables.
Rename cache names to be clearer.
1999-11-22 17:56:41 +00:00
Bruce Momjian 86ef36c907 New NameStr macro to convert Name to Str. No need for var.data anymore.
Fewer calls to nameout.

Better use of RelationGetRelationName.
1999-11-07 23:08:36 +00:00
Bruce Momjian c3ac9f07b7 Hi,
I have changed a bit the makefiles for the win32 port - the *.def files
(created when building shared libraries) are now clean from
Makefile.shlib.

I have also removed "-g" from CFLAGS in the "cygwin32" template - it can
be
enabled when running configure.

                        Dan
1999-10-13 11:38:42 +00:00
Bruce Momjian 392f304cae gram.y cleanup 1999-09-21 21:10:37 +00:00
Bruce Momjian 80751a72ee Make proper plpgsql non-externs. 1999-09-20 22:28:05 +00:00
Bruce Momjian 7559677551 Define plpgsql_yylineno as non-extern somewhere for bsdi. 1999-09-20 02:12:31 +00:00
Tom Lane f4add18557 Fix quoting problems in mkMakefile.tcldefs.sh.in and
mkMakefile.tkdefs.sh.in.
1999-08-29 20:09:44 +00:00
Bruce Momjian e69a997d02 Allow BSD yacc and bison to compile pl code. 1999-08-16 19:57:21 +00:00
Bruce Momjian f0b651ac6b replace #Include . 1999-08-09 00:08:52 +00:00
Bruce Momjian 4cddd482c1 Fix so BSD yacc works on file. 1999-08-07 04:25:02 +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
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
Tom Lane fa179dde82 Make sure symlinks for sharedlib get removed by 'make clean'. 1999-06-30 23:57:31 +00:00
Bruce Momjian 26fb87d37e Fix compile of plpgsql by adding 'extern int yylineno.' 1999-05-26 20:55:06 +00:00
Bruce Momjian 278bbf4572 Make functions static or NOT_USED as appropriate. 1999-05-26 12:57:23 +00:00
Bruce Momjian fcff1cdf4e Another pgindent run. Sorry folks. 1999-05-25 22:43:53 +00:00
Bruce Momjian 07842084fe pgindent run over code. 1999-05-25 16:15:34 +00:00
Tom Lane 5085132c6d Fix configure to generate correct expansion of library directory
in pl/plpgsql/src/mklang.sql.
1999-05-11 22:57:50 +00:00
Bruce Momjian 1ba362f567 put back mklang.sql.in file. 1999-05-11 03:30:41 +00:00
Bruce Momjian 12f9de3fd4 clean up comments 1999-05-11 03:28:43 +00:00
Bruce Momjian 4853495e03 Change error messages to oids come out as %u and not %d. Change has no
real affect now.
1999-05-10 00:46:32 +00:00
Tom Lane 09c5e84072 Change elog(ERROR) to get back to main loop via a plain sigsetjmp,
instead of doing a kill(self, SIGQUIT) and expecting the signal handler
to do it.  Also, clean up inconsistent definitions of the sigjmp buffer
in the several files that already referenced it.
1999-04-20 02:19:59 +00:00
Bruce Momjian 48ea8b76db Hi,
I have solved some problems with dynamic loading on NT. It is possible
to
run succesfully both trigger and plpgsql regression tests. The patch is
in
the included file "diff".

                        Dan
1999-03-22 16:45:30 +00:00
Tom Lane 8425c2496f Ah, *now* I understand: plpgsql lexer must be generated with flex -l ... 1999-03-21 02:27:47 +00:00
Tom Lane 1b8d9466fb Hmm, it seems some versions of flex declare yytext as extern char[]
but others declare it as extern char *.  gcc complains (quite rightly too).
Worked around it by rearranging the order of inclusions so that we don't
have to explicitly declare yytext; this should work with either variant.
1999-03-21 01:07:07 +00:00
Tom Lane 19e4d33bf0 Remove yacc/lex output files from CVS repository. 1999-03-20 18:03:37 +00:00
Tom Lane bb7c0da104 Clean up build procedure: do not keep raw lex/yacc files around,
only the edited ones.
1999-03-20 18:00:38 +00:00
Tom Lane 45ff93c460 Include -lcrypt when needed to link libpgtcl.so and plpgsql.so 1999-02-07 22:10:47 +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 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +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
Jan Wieck 51e8a1d390 New prebuilt versions of gram.c and scan.c for the mixed case
identifier support.

Jan
1999-01-28 11:50:42 +00:00
Jan Wieck c42b959fb3 Partial support for mixed case in PL/pgSQL.
Left are identifiers that contain non-alnum/_ chars.
So e.g. whitespaces in identifiers are still not
supported.

Jan
1999-01-28 11:48:31 +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
Tom Lane 52065cf347 Clean up trivial compiler warning from gcc. 1999-01-17 21:53:32 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Bruce Momjian 3cd3be92ff Fix deadlock so it only checks once. 1998-12-18 19:45:38 +00:00
Tom Lane e3909672f1 Build pltcl.so correctly on platforms that want dependent
shared libraries to be listed in the link command.
1998-12-13 23:46:49 +00:00
Bruce Momjian 26a23e33db Add enable_plpgsql from Oliver. 1998-12-13 05:22:58 +00:00
Vadim B. Mikheev 971175fa0c New HeapTuple structure/interface. 1998-11-27 20:09:56 +00:00
Jan Wieck 07ffc4628e Fixed bug in the unknown module. Module still tried to call
builtin SPI commands by their old SPI_* names. New names are spi_*.

Jan - 11/23/1998
1998-11-23 16:50:54 +00:00
Thomas G. Lockhart 3d22596fe7 August version of docs superceded by sgml version from Jan. 1998-11-06 15:04:31 +00:00
Tom Lane 54789138bd Behave reasonably on a system without shared libraries. 1998-10-30 15:05:23 +00:00
Bruce Momjian f4ccb5e170 Make these file generated in distribution. 1998-10-28 17:07:17 +00:00
Tom Lane 6d98d3737a Centralized shared-library build knowledge in a new file,
src/Makefile.shlib.  Updated all the makefiles that try to build shlibs
to include that file instead of having duplicate (and mostly incomplete)
copies of shared-library options.  It works on HPUX, a lot better than it
did before in fact, but there's a chance I broke some other platforms.
At least now you only have to fix one place not six...
1998-10-19 00:00:51 +00:00
Tom Lane e1942f5b9e Clean up shared makefile install procedures.
Get the permissions right, don't overwrite real files with symlinks, etc.
plpgsql and odbc still aren't fully up to speed, but at least they don't crash and burn...
1998-10-18 19:41:00 +00:00
Tom Lane f2ca34dfb3 Add code to pltcl's Makefile to cope with the situation where
libtcl has been installed as a non-shared library.  pltcl cannot be
built in that situation; we want to do nothing and let the overall Postgres
build complete, rather than failing.
1998-10-17 23:33:23 +00:00
Bruce Momjian ecf145f492 Remove TCL_LIB,TCL_INCDIR,TK_LIB,TK_INCDIR. 1998-10-13 16:30:49 +00:00
Bruce Momjian c743b8cecd Add mklang.sh.in to plpgsql. 1998-10-12 04:55:03 +00:00
Bruce Momjian 0f78649ccc Cleanup from Billy. 1998-10-12 04:45:22 +00:00
Bruce Momjian 2facf5460f TCL_LIB, TCL_INC not used. 1998-10-12 04:40:48 +00:00
Bruce Momjian d2d919f7b7 tcl cleanup. 1998-10-12 04:32:24 +00:00
Bruce Momjian 7a9312b422 Tcl fixes from Billy G. Allie 1998-10-12 02:41:01 +00:00
Bruce Momjian e48623ce87 More Solaris fixes. 1998-10-12 01:23:29 +00:00
Bruce Momjian e16634386a Add SVr4 shared libraries. 1998-10-12 01:10:09 +00:00
Bruce Momjian 66f893f3fe Solaris shared library fixes. 1998-10-12 01:04:02 +00:00
Bruce Momjian 40703f282a There where a few more problems fixed by the patch below.
o configure.in

Jan.
1998-10-09 16:57:10 +00:00
Bruce Momjian a8428c9e3f More bsdi 4.0 cleanups for shared libraries. 1998-10-09 04:50:12 +00:00
Bruce Momjian 765dd1b3f2 More bsdi 4.0 fixes. 1998-10-09 04:22:49 +00:00
Bruce Momjian af45dab6d7 Fix for BSDI shared libraries. 1998-10-09 03:08:00 +00:00
Bruce Momjian db882f6a18 Cleanup of pl files. 1998-10-09 00:41:28 +00:00
Bruce Momjian 23815260a3 I have had a few problems with the PL stuff recently committed. The
following patches fix the problems (i.e., all regression tests pass)
in what I hope to be a platform-independent fashion.  The accomplish
the following:

Brook Milligan
1998-10-08 23:45:19 +00:00
Bruce Momjian 18af384bb7 Unixware patches from Billy G. Allie. 1998-10-04 15:38:58 +00:00
Bruce Momjian 3f2fff5c5d Search contrib/tcl for tcl startup. 1998-10-02 01:22:43 +00:00
Marc G. Fournier 2074b5f1ad failed to add some of Jan's files :( 1998-10-01 03:38:45 +00:00
Bruce Momjian d73f73af6e Add new Makefile from Jan. 1998-09-25 15:50:02 +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 28d90a5f8b move plpgsql 1998-08-24 19:16:28 +00:00
Bruce Momjian 0c5e541a9a move plpgsql to src/pl for Jan. 1998-08-24 19:14:51 +00:00
Bruce Momjian 7971539020 heap_fetch requires buffer pointer, must be released; heap_getnext
no longer returns buffer pointer, can be gotten from scan;
	descriptor; bootstrap can create multi-key indexes;
pg_procname index now is multi-key index; oidint2, oidint4, oidname
are gone (must be removed from regression tests); use System Cache
rather than sequential scan in many places; heap_modifytuple no
longer takes buffer parameter; remove unused buffer parameter in
a few other functions; oid8 is not index-able; remove some use of
single-character variable names; cleanup Buffer variables usage
and scan descriptor looping; cleaned up allocation and freeing of
tuples; 18k lines of diff;
1998-08-19 02:04:17 +00:00
Bruce Momjian 6bd323c6b3 Remove un-needed braces around single statements. 1998-06-15 19:30:31 +00:00
Bruce Momjian 471dbbc223 DESTDIR removed, again. 1998-04-06 16:53:15 +00:00
Bruce Momjian 5523beb949 Re-introduce $DISTDIR. 1998-04-06 01:16:55 +00:00
Bruce Momjian 1e801a8f16 Hi,
Attached you'll find a (big) patch that fixes make dep and make
depend in all Makefiles where I found it to be appropriate.

It also removes the dependency in Makefile.global for NAMEDATALEN
and OIDNAMELEN by making backend/catalog/genbki.sh and bin/initdb/initdb.sh
a little smarter.

This no longer requires initdb.sh that is turned into initdb with
a sed script when installing Postgres, hence initdb.sh should be
renamed to initdb (after the patch has been applied :-) )

This patch is against the 6.3 sources, as it took a while to
complete.

Please review and apply,

Cheers,

Jeroen van Vianen
1998-04-06 00:32:26 +00:00
Bruce Momjian 2dfee93457 Remove DISTDIR. 1998-04-05 22:02:56 +00:00
Bruce Momjian a32450a585 pgindent run before 6.3 release, with Thomas' requested changes. 1998-02-26 04:46:47 +00:00
Marc G. Fournier ce88b9b40b From: Jan Wieck <jwieck@debis.com>
just a little correction in the pltcl_guide.nr.

    Sometimes I changed the name of tuple arguments to numbers
    like the other args are. Otherwise it wasn't possible to
    create a function as

        CREATE FUNCTION f (EMP, EMP) ... LANGUAGE 'pltcl';

    The arguments are now accessed in the function as

        $1(name) vs. $2(name)
1998-02-13 17:18:25 +00:00
Marc G. Fournier 2784f7c81a From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:38:31 +00:00
Marc G. Fournier 957a6149e5 From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:14:18 +00:00
Marc G. Fournier a71a80b0f2 From: Jan Wieck <jwieck@debis.com>
A few minutes ago I sent down the PL/Tcl  directory  to  this
    list.  Look at it and reuse anything that might help to build
    PL/perl.  I really hope that PL/perl and PL/Tcl appear in the
    6.3 distribution. I'll do whatever I can to make this happen.
1998-02-11 14:08:01 +00:00