SunOS has tas(), but not memmove or strerror, and its sprintf() doesn't
return int. Also, older versions of GNU Make don't like rules with
empty left-hand sides...
instead of relying on port's os.h to tell us. (Needed for HPUX
where system major version is not enough info.)
configure unsets USE_TK if X libraries not found.
doc/Makefile uses gzcat or zcat as found by autoconf.
than silently returning zero on some machines. Correct float8 regress test
to agree. Also fix pow() overflow/underflow check to work correctly on
HPUX.
fail to consume the rest of the input string, and worse it would write
one more byte than it should into the buffer, probably resulting in coredump.
Fortunately there's a correct implementation next door in pqcomprim.c.
selected when they match a prefix of the value. The previous method,
which stripped all version data from and then tried to match that
against .similar entries, was entirely useless when .similar contained
several entries for different version numbers of a single OS name.
a backend core dump, because it was concatenating a potentially long
string onto another string that didn't necessarily have enough room.
Shame, shame.
This is the default, but the new flag will allow overriding an alias,
for example. So psql -n -N will put in the double quotes,
and psql -n can be an alias for psql.
Also, add a few braces around a nested single-line conditional construct
to suppress compiler warnings about "an ambiguous else".
From: SHIOZAKI Takehiko <takehi-s@ascii.co.jp>
I tried snapshot(Oct30) and made some patches.
# I think that it is confused to manage both Makefile.shlib and
# makefiles/Makefile.*, don't you?
* configure
Now FreeBSD 2.X is not supported..., so I added its entry.
If ELF_SYSTEM is set, gmake treat it defined even though
it is "false". So nothing should be set to use "ifdef".
BSD_SHLIB etc. may have same problems.
* Makefile.shlib
As you said, FreeBSD entry is much like BSD's.
I only added ELF_SYSTEM code.
* makefiles/Makefile.freebsd
Ifdef/else/endif can not be indented with TABs.
ie, not when user specifies --with-CC. This corrects a scripting error
that I'm surprised hasn't been reported more often. Moving the macro call
to the earlier point in the script is correct anyway: if -traditional is needed,
it should get added to CFLAGS before we start using the compiler for
other tests.
mistakes in creating pg_operator table. NOTE: right now, this will
fail because of conflicting definitions for point @ path operator.
I trust we're gonna fix that.
oprlsortop and oprrsortop links. There's still a bug involving
conflicting definitions for point @ path, but I'm not taking
responsibility for deciding which one is right...
(Someone forgot whether their subroutine signaled errors by a NULL pointer
return value, or a negative integer... I'm surprised gcc -Wall doesn't
catch this...)
Fixes a bug in the rule system that caused a crashing
backend when a join-view with calculated column is used
in subselect.
Modifies EXPLAIN to explain rewritten queries instead of
the plain SeqScan on a view. Rules can produce very deep
MORE
Jan.
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...
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...
problem:
'tclsh' still had to be found even if --with-libs (or
--with-libraries) was
specified to configure.
--with-libs is really an overloaded option. It really should only be used
to specify additions directories to search in order to file needed
libraries. It was also being used to locate the *Config.sh files.
Billy G. Allie
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.
DataDir is set after read_pg_options if postgres is called
interactively. If postgres is forked by postgres DataDir is read from
the PGDATA enviromnent variable set by the postmaster and this explains
while the bug disappears. I have written this patch but I don't like
it. Any better idea?
Massimo Dal Zotto
compile out of the tar file on Solaris with the SUN 5.0 compilers.
These compilers will be needed if you wan to compile the libpg++
interface without using the gcc/g++. The SC4.2 compilers do not
understand the string class.
The first patch changes the ecpg intermediate shared library
name from *.sho to *.sho.o so that the SUN compiler will
allow it to be used in conjunction with the -o option.
Matthew C. Aycock
Here are patches needed to complie under AIX 4.2.
I changed configure.in, pqcomm.c, config.h.in, and fe-connect.c.
Also I had to install flex because lex did not want to translate pgc.l.
do not configure in the perl5 interface.
the perl5 interface needs to be installed under /usr/local/lib/perl5/*, which
is generally owned by root. This allows a non-root build/install with the
only root requirement being the make/install of hte perl5 stuff...
When importing an image into the database, the example now fires off a
new
Thread, which imports the image in the background. This also means that
the application doesn't freeze on the user, and they can still browse
the
images in the database, while the upload is running.
This now makes the ImageViewer a true example on how to use Threads (the
threadtest class is just that - a test).
Peter
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
is wrong and dangerous unless you are using contrib/string. We really
need a thorough look at the issue of making the backend and the FE/BE
protocols completely 8-bit-clean for string data, but that's a task
for some future release.
newly-updated SGML reference pages, so I just inserted a comment that they
are obsolete. If you want to transcribe the newer info into these pages,
be my guest.
important step towards making the driver compliant, and means that for
some Java applications and servlets, only a single database connection
is
needed, so in a sence this is a nice little show stopper for 6.4 (and
should still be backward compatible to 6.3.2).
Peter
Here are two new patches for the Win32 support.
1) The patch based on the one from Hiroshi Inoue [Inoue@tpf.co.jp], to
load
Winsock.dll from libpq.dll.
2) A patch for psql.c to remove the call to WSAStartup(), since it is
not
required when it's done in libpq.dll.
I'm still looking for the possibility of having a crypt() function in
libpq.dll too, the same way getopt was included. Any chance of getting
this
before 6.4, or should we wait for the next one?
//Magnus
Use @top-srcdir@ to find the right Makefile.global and use ODBCSRCDIR
to point to this local directory.
Move non-platform-specific stuff to outside the if clauses.
Still need to move all platform-specific stuff to the templates.
Before, "make install" did not run the lextest.
Fix up the ODBC make from this main configure.
Include configure test for "ln -s" in Makefile.global.in.
Was always in configure, just not carried through to here for use.
to get rid of unused variables.
Get clean compile on Linux (Thomas and Gerald).
Implement autoconf/configure for standalone builds and use the existing
autoconf/configure system when in the Postgres source tree.
Code tests and functions with ApplixWare-4.4.1beta on a Linux box.
Changes should be backward compatible with WIN32 but still needs testing.
Is it too late to add a feature to pg_dump for 6.4??
I just spent most of the day learning pg_dump and modifing it so it
would
dump views also.
This is the first time I have ever contributed any code changes, so I'm
not sure of how to submit it.
The diff's and a readme as a tgz file are attached.
Thanks
Terry Mackintosh <terry@terrym.com> http://www.terrym.com
regression test on a FreeBSD box with both non-MULTIBYTE and
MULTIBYTE-enabled, and confirmed that the results are same.
However I do not tested on PCs(I don't have access to win). Please let
me know if the patches break anything on PCs.
Also please note that the patch for varchar.c is a fix for a nasty bug
of char(n) types that I introduced and I believe at least this should
be applied.
Tatsuo Ishii
and make backend/libpq/pqcomm.c only try to lock the socket file when
the call exists. Also, change open-RDONLY to open-WRONLY; at least
on my platform, you can't get a write lock on a file you didn't open
for writing.
Check strdup calls for out of memory.
Set library version to 2.6.2
Synced preproc.y and keywords.c with gram.y and keywords.c yet again.
Set version to 2.4.3
columns of views at all (not only oid, cmin etc. too).
pgsql=> select cmin from pg_rules;
ERROR: system column cmin not available - pg_rules is a view
pgsql=> select * from pg_rules where pg_rules.oid = pg_class.oid;
ERROR: system column oid not available - pg_rules is a view
pgsql=>
Jan
Formerly did so only for those which clearly required it, but that
would still miss things like reserved key words which also require it.
Implement the "-n" switch to revert the double quote behavior
to put DQs only where there is more than lower-case, digits,
and underscores.
for against a just updated CVS tree. It contains
Partial new rewrite system that handles subselects, view
aggregate columns, insert into select from view, updates
with set col = view-value and select rules restriction to
view definition.
Updates for rule/view backparsing utility functions to
handle subselects correct.
New system views pg_tables and pg_indexes (where you can
see the complete index definition in the latter one).
Enabling array references on query parameters.
Bugfix for functional index.
Little changes to system views pg_rules and pg_views.
The rule system isn't a release-stopper any longer.
But another stopper is that I don't know if the latest
changes to PL/pgSQL (not already in CVS) made it compile on
AIX. Still wait for some response from Dave.
Jan
parameters. With it applied a function like
CREATE FUNCTION getname(oid8, int4) RETURNS name AS
'SELECT typname FROM pg_type WHERE oid = $1[$2]'
LANGUAGE 'sql';
is possible. Mainly I need this to enable array references in
expressions for PL/pgSQL. Complete regression test ran O.K.
Jan
spin-locks. Notice that it's now inline assembler in s_lock.h,
rather than seperate code in s_lock.c. It also shrank a little
bit... Just rip out the S_LOCK() define and insert the tas() inline
function. Please let me know if there are any problems with it.
Jon Buller
and what wasn't. Also try to improve the comments so that doesn't happen
again. Changed SIGPIPE handling to SIG_IGN so that if frontend quits,
we will finish out the current command and return to main loop before
quitting. This seems much safer than a forced abort mid-command.
Add "timestamp" to list of tokens in keywords.c.
Before, TIMESTAMP WITH TIME ZONE did not actually parser.
Reorder token lists to be more alphabetical.
Remove ARCHIVE keyword which was deprecated in v6.3.
here is the patch that includes PL/pgSQL into the build
(currently with make errors ignored) and adds a regression
test for it. A clean build and regression ran fine here.
Can you please apply it?
The tar should be extracted in /usr/local/src/pgsql and
creates the following files:
src/pl/Makefile
called by toplevel GNUmakefile and for now only calls
src/pl/plpgsql/Makefile
src/pl/plpgsql/Makefile
calls src/pl/plpgsql/src/Makefile (here the call to
make ignores build errors - this must be changed
later for the final release).
src/test/regress/input/install_plpgsql.source
SQL script installing PL/pgSQL language in regression
database. Will be modified by .../input/Makefile to
point to correct PGLIB directory where plpgsql.so
gets installed.
src/test/regress/output/install_plpgsql.source
expected output for installation script.
src/test/regress/sql/plpgsql.sql
the main regression test. It tests functions and
triggers written in PL/pgSQL including views that use
supportfunctions in this language.
src/test/regress/expected/plpgsql.out
the expected output for the above regression test.
make_plpgsql.diff
patch that adds some lines to
src/GNUmakefile.in
src/test/regress/expected/Makefile
src/test/regress/input/Makefile
src/test/regress/output/Makefile
src/test/regress/sql/Makefile
src/test/regress/sql/tests
test passes. Interestingly, the fix involves no changes or special
cases in the union test and actually removes a special case for the
numerology test. Thus, following the strategy outlined below is a
definite improvement over the previous situation.
Cheers,
Brook
+ Mon Aug 31 09:40:04 CEST 1998
+
+ - Minor patch to Makefile
+ - Put pgc.l in sync with scan.l
+
+ Tue Sep 1 11:31:05 CEST 1998
+
+ - Fixed another bug in preproc.y
+
+ Thu Sep 3 12:21:16 CEST 1998
+
+ - Sync preproc.y with gram.y
+
+ Mon Sep 14 09:21:02 CEST 1998
+
+ - Sync preproc.y with gram.y yet again
+
+ Thu Sep 17 08:55:33 CEST 1998
+
+ - Synced preproc.y and gram.y one more time
+
+ Thu Sep 17 19:23:24 CEST 1998
+
+ - Added missing ´;´ in preproc.y
+ - Set version to 2.4.2
* It works under both Tcl 7.6 and Tcl 8.0 now. (The code claims to
work under Tcl 7.5 as well, but I have no way to test that ---
if anyone still cares, please check it with 7.5.)
* pg_listen suppresses extra LISTEN commands and correctly sends an
UNLISTEN when the last listen request for a relation is cancelled.
(Note this means it will not work with pre-6.4 backends, but that
was true already because it depends on the current libpq, which
only speaks protocol 2.0.)
* Added -error option to pg_result so that there's some way to find
out what you did wrong ;-)
* Miscellaneous cleanups of code comments and overenthusiastic #includes.
BTW, I bumped the package version number from 1.2 to 1.3. Is this
premature? Does someone run around and do that routinely before
each pgsql release?
regards, tom lane
prompt_for_password code that psql does. We fixed psql a month or
two back to permit usernames and passwords longer than 8 characters.
I propagated the same fix into pg_dump.
Tom Lane
Change DEFAULT NULL to send back a NULL pointer
rather than a string "NULL". This seems to work, where sending
the string led to type conversion problems (and probably the wrong
thing anyway).
rather than func_select_candidate().
Fix oper_select_candidate() to work with a single operator argument.
Repair left operator checking for null return from candidate list.
as, if not installing as root (which nobody *should* be doing, of course),
the perl install fails, which means that both bin and man directories
are not installed :(
This way, only thing that doesn't get installed is perl interface...
compiler to
attempt to compile libpq++. The patches address the following problems:
1. In my first pass at changing the libpq++ makefile, I forgot to
include the
PORTNAME in the Makefile.in file.
2. The UnixWare 7 C++ compiler did not like the '-K alloca' option in
CXXFLAGS.
Billy G. Allie
implementations of strtol() treat empty strings ("") as invalid arguments
while others convert this (erroneously, IHMO) to zero (0). Assuming that the
expected behaviour of pg_atoi() is to return 0 if it is passed an empty
string, I am supplying the following patch to explictly check for an empty
string in pg_atoi() and return 0 if the string is empty. The patch will also
trap a NULL character pointer being passed to pg_atoi() and will use elog() to
print out an error message if the input char pointer is NULL.
Billy G. Allie
1. The UnixWare tas macro was reformatted (by indent or it like?) which caused
it to break. The asm macro construct is very particular about the %mem
construct -- it has to start in column 1.
2. When compiling libpq++, g++ was used even if configure found the C++ com-
piler to be CC.
3. When compiling libpq++, '-Wno-error' was added to CXXFLAGS, even if the
compiler wasn't g++.
Billy G. Allie
> Open portability issues:
>
> /usr/local should be searched for lib and include for all ports if
present
> (currently not working, I have libreadline there)
>
> the stream functions on AIX need a size_t for addrlen's in
fe-connect.c and pqcomm.c.
>
> lock.c still has an incompatible TPRINTF(flags, args...) definition
Massimo
Here's a patch for initdb that does two things.
1) Encloses the created rulenames in quotes to preserve case
in the creation step. (stores _RETpg... instead of _retpg...)
I believe _RET is standard for views.
2) Renames pg_view to pg_views and pg_rule to pg_rules.
I believe Jan and myself agreed this would be a "good idea"
Keith Parks
I put some extra checks to make sure a query was a good candidate for
rewrite into a UNION. Besides the existing checks:
1. Make sure the AND/OR tree was rectangular. ( i.e. 3 X 4 or 10 X
3)
2. Only one table.
3. Must have an AND dimension.
4. At least 9 OP expressions total
Also cleaned up and commented.
before.
> Looks like a GNU-ism. I nice one, but still a GNU-ism.
Sorry, I didn't know it is a GNU extension. I have written this patch
which should fix the problem. Let me know if you still have problems.
Massimo Dal Zotto
compiled with -O0. Included are patches that should fix the problem
(of course I have confirmed -O2 works with this patch).
BTW, here is a platforms/regression test failure(serious one--backend
death) matrix.
Tatsuo Ishii
structs from libpq-fe.h, as we previously discussed.
There turned out to be sloppy coding practices in more places than
I had realized :-(, but all in all I think it was a well-worth-while
exercise.
I ended up adding several routines to libpq's API in order to respond
to application requirements that were exposed by this work. I owe the
docs crew updates for libpq.sgml to describe these changes. I'm way too
tired to work on the docs tonight, however.
This is the last major change I intend to submit for 6.4. I do want
to see if I can make libpgtcl work with Tcl 8.0 before we go final,
but hopefully that will be a minor bug fix.
>
> Please apply this HAVING regression patch.
> > My bad. It is caused by a known bug having to do with GROUP BY.
It ain't$
> > nothing to do with HAVING. For some reason the bug went away for a
while, $
> > script. It must have, because that is how I created the expected
file. :(
> >
> > A patch to the regression will be forthcoming.
>
We're carrying around a copy of install-sh in case the local system
has no install script. It's wasted baggage, because configure doesn't
know it's there :-(. (Apparently everyone who's used postgres lately
already had an install script somewhere in their path. I happened to
try to run configure with a minimal PATH tonight, and it promptly
gave up for lack of an install program.) Here's the patch.
After some playing with gdb I found that in printtup() there is a non null
attribute with typeinfo->attrs[i]->atttypid = 0 (invalid oid). Unfortunately
attibutes with invalid type are neither printed nor marked as null, and this
explains why psql doesn't get all the expected data.
So I made this patch to printtup():
ODBC driver have found a bug in 6.3.2 pg_dump and have made patches.
I confirmed that the same bug still exists in the current source
tree. So I made up patches based on Kataoka's. Here are some
explanations.
o fmtId() returns pointer to a static memory in it. In the meantime
there is a line where is fmtId() called twice without saving the
first value returned by fmtId(). So second call to fmtId() will
break the first one.
o findTableByName() looks up a table by its name. if a table name
contanins upper letters or non ascii chars, fmtId() will returns
a name quoted in double quotes, which will not what findTableByName()
wants. The result is SEG fault. -- Tatsuo Ishii t-ishii@sra.co.jp
Here is a new patch for libpq, to make it work on Win32 again (since
the latest modifications broke it a little).
Please also add the file "libpq.rc" to the interfaces/libpq directory.
This will allow version-stamping of the generated DLL file, so that
automatic install programs (and interested users) can determine
the version of the file. The file is currently set as "prerelease".
Before the release, somebody should change the line "FILEFLAGS
VS_FF_PRERELEASE" to "FILEFLAGS 0". That information should probably
go into toos\RELEASE_CHANGES.
The patch is against the cvs as of ~ 1998-08-26 14:30 CEST.
//Magnus
This one is against the current archive (so it contains the one I send the
other day). It should fix the AIX problems. Andreas, could you please try
it? Thanks.
+ Wed Aug 26 16:17:39 CEST 1998
+
+ - Sync preproc.y with gram.y
+
+ Thu Aug 27 15:32:23 CEST 1998
+
+ - Fix some minor glitches that the AIX compiler complains about
+ - Added patchlevel to library
+
+ Fri Aug 28 15:36:58 CEST 1998
+
+ - Removed one line of code that AIX complains about since it was not
+ needed anyway
+ - Set library version to 2.6.1
I don't know if this is really related to the initdb problem
discussion (haven't followed it enough). But seems so because
it fixes a damn problem during index tuple insertion on
CREATE TABLE into pg_attribute_relid_attnum_index.
Anyway - this bug was really hard to find. During startup the
relcache reads in some prepared information about index
strategies from a file and then reinitializes the function
pointers inside the scanKey data. But for sake it assumed
single attribute index tuples (hasn't that changed recently).
Thus not all the strategies scanKey entries where initialized
properly, resulting in invalid addresses for the btree
comparision functions.
With the patch at the end the regression tests passed
excellent except for the sanity_check that crashed at vacuum
and the misc test where the select unique1 from onek2 outputs
the two rows in different order.
Jan
Ok. Here is a patch to make psql work on Win32 (as a console mode
application, of course).
It requires getopt.c to be in src/utils - works fine with the FreeBSD
version of it.
Also, the file win32.mak should go into src/bin/psql.
> these patches define the UNLISTEN sql command. The code already
> existed but it was unknown to the parser. Now it can be used
> like the listen command.
> You must make clean and delete gram.c and parser.h before make.
> tprintf.patch
>
> tprintf.patch
>
> adds functions and macros which implement a conditional trace package
> with the ability to change flags and numeric options of running
> backends at runtime.
> Options/flags can be specified in the command line and/or read from
> the file pg_options in the data directory.
> socket-flock.patch
>
> use advisory locks to check if the unix socket can be deleted.
> A running postmaster keeps a lock on that file. A starting
> postmaster exits if the file exists and is locked, otherwise
> it deletes the sockets and proceeds.
> This avoid the need to remove manually the file after a postmaster
> or system crash.
> I don't know if flock is available on any system. If not we could
> define a HAVE_FLOCK set by configure.
> sinval.patch
>
> fixes a problem in SI cache which causes table overflow if some
> backend is idle for a long time while other backends keep adding
> entries.
> It uses the new signal handling implemented in tprintf.patch.
> I have also increacasesed the max number of backends from 32 to 64
> and the table size from 1000 to 5000.
> I don't know if anybody is working on SI, but until another
> solution is found this patch fixes the problem. I have received
> messages from other people reporting the same problem which I
> fixed many months ago.
> sequence.patch
>
> adds the missing setval command to sequences. Owner of sequences
> can now set the last value to any value between min and max
> without recreating the sequence. This is useful after loading
> data from external files.
> ps-status.patch
>
> macros for ps status, used by postgres.c and utility.c.
> Unfortunately ps status is system dependent and the current
> code doesn't work on linux. The use of macros confines system
> dependency to into one file (ps-status.h). Users of other
> operating systems should check this code and submit new macros.
lock.patch
I have rewritten lock.c cleaning up the code and adding better
assert checking I have also added some fields to the lock and
xid tags for better support of user locks. There is also a new
function which returns an array of pids owning a lock.
I'm using this code from over six months and it works fine.
assert.patch
adds a switch to turn on/off the assert checking if enabled at compile
time. You can now compile postgres with assert checking and disable it
at runtime in a production environment.
(Mark or Bruce?) It fixes a problem when cpp gives a warning when
precompiling /dev/null like: "/dev/null", line 1: 1506-229 (W)
File is empty. This leads to a hangup when doing the description
load during initdb, since stderr also ends up in the global1.description
and local1_template1.description
stderr has to be redirected to /dev/null:
Andreas Zeugswetter
statements:
- the table definition with a default clause referencing the sequence;
- a CREATE SEQUENCE statement;
- a UNIQUE constraint, which expands into a CREATE INDEX statement.
This is not a perfect solution, since the sequence will remain even if
the table is dropped. Also, there is no absolute protection on updating
the sequence column.
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+ - Added EXEC SQL DEFINE statement
+ - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+ - Removed keyword IS from DEFINE statement
+ - Added latest changes from gram.y
+ - Removed duplicate symbols from preproc.y
+ - Initialize sqlca structure
+ - Added check for connection to ecpglib
+ - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+ - Cleaned up memory allocation in ecpglib.c
+ - Set library version to 2.6
+
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+ - Added EXEC SQL DEFINE statement
+ - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+ - Removed keyword IS from DEFINE statement
+ - Added latest changes from gram.y
+ - Removed duplicate symbols from preproc.y
+ - Initialize sqlca structure
+ - Added check for connection to ecpglib
+ - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+ - Cleaned up memory allocation in ecpglib.c
+ - Set library version to 2.6
+
+
+ Fri Aug 14 12:44:21 CEST 1998
+
+ - Added EXEC SQL DEFINE statement
+ - Set version to 2.4.0
+
+ Tue Aug 18 09:24:15 CEST 1998
+
+ - Removed keyword IS from DEFINE statement
+ - Added latest changes from gram.y
+ - Removed duplicate symbols from preproc.y
+ - Initialize sqlca structure
+ - Added check for connection to ecpglib
+ - Set version to 2.4.1
+
+ Thu Aug 20 15:31:29 CEST 1998
+
+ - Cleaned up memory allocation in ecpglib.c
+ - Set library version to 2.6
+
Thanks. But patches for src/backend/catalog/Makefile seems missing
in the current source tree. Please apply attached patches.
It also includes some corrections to src/backend/util/mb/wchar.c.
-- Tatsuo Ishii t-ishii@sra.co.jp
[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_LONG_INT_64)],
this line produces something like:
echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF
and would append garbage "yes cat" to confdefs.h. Of course the
result confdefs.h is not syntactically correct therefore following
tests using confdefs.h would all fail. To avoid the problem, we
could switch the order of AC_MSG_RESULT and AC_DEFINE (see attached
patch). This happend on my LinuxPPC box.
Tatsuo Ishii t-ishii@sra.co.jp
patch is applied:
Rewrite rules on relation level work fine now.
Event qualifications on insert/update/delete rules work
fine now.
I added the new keyword OLD to reference the CURRENT
tuple. CURRENT will be removed in 6.5.
Update rules can reference NEW and OLD in the rule
qualification and the actions.
Insert/update/delete rules on views can be established to
let them behave like real tables.
For insert/update/delete rules multiple actions are
supported now. The actions can also be surrounded by
parantheses to make psql happy. Multiple actions are
required if update to a view requires updates to multiple
tables.
Regular users are permitted to create/drop rules on
tables they have RULE permissions for
(DefineQueryRewrite() is now able to get around the
access restrictions on pg_rewrite). This enables view
creation for regular users too. This required an extra
boolean parameter to pg_parse_and_plan() that tells to
set skipAcl on all rangetable entries of the resulting
queries. There is a new function
pg_exec_query_acl_override() that could be used by
backend utilities to use this facility.
All rule actions (not only views) inherit the permissions
of the event relations owner. Sample: User A creates
tables T1 and T2, creates rules that log
INSERT/UPDATE/DELETE on T1 in T2 (like in the regression
tests for rules I created) and grants ALL but RULE on T1
to user B. User B can now fully access T1 and the
logging happens in T2. But user B cannot access T2 at
all, only the rule actions can. And due to missing RULE
permissions on T1, user B cannot disable logging.
Rules on the attribute level are disabled (they don't
work properly and since regular users are now permitted
to create rules I decided to disable them).
Rules on select must have exactly one action that is a
select (so select rules must be a view definition).
UPDATE NEW/OLD rules are disabled (still broken, but
triggers can do it).
There are two new system views (pg_rule and pg_view) that
show the definition of the rules or views so the db admin
can see what the users do. They use two new functions
pg_get_ruledef() and pg_get_viewdef() that are builtins.
The functions pg_get_ruledef() and pg_get_viewdef() could
be used to implement rule and view support in pg_dump.
PostgreSQL is now the only database system I know, that
has rewrite rules on the query level. All others (where I
found a rule statement at all) use stored database
procedures or the like (triggers as we call them) for
active rules (as some call them).
Future of the rule system:
The now disabled parts of the rule system (attribute
level, multiple actions on select and update new stuff)
require a complete new rewrite handler from scratch. The
old one is too badly wired up.
After 6.4 I'll start to work on a new rewrite handler,
that fully supports the attribute level rules, multiple
actions on select and update new. This will be available
for 6.5 so we get full rewrite rule capabilities.
Jan
the following to regress/sql/tests.
If applying by hand note that the setup_... must run before
the run_... (that I splitted these two was due to the errors
that occured when creating rules and using them then in the
same session - I'll post another fix for this later).
BTW: the regression tests sanity_checks and alter_table fail
now due to the remove of some indices and the oidint4 and
oidname types. At least expectes should be set to the current
results.
Thanks.
Jan
if MULTIBYTE is not enabled. So be sure to run initdb.
o these patches are made against the latest source tree (after
Bruce's massive patch, I think) BTW, I noticed that after running
regression, the oid field of pg_type seems disappeared.
regression=> select oid from pg_type; ERROR: attribute
'oid' not found
this happens after the constraints test. This occures with/without
my patches. strange...
o pg_database_mb.h, pg_class_mb.h, pg_attribute_mb.h are no longer
used, and shoud be removed.
o GetDatabaseInfo() in utils/misc/database.c removed (actually in
#ifdef 0). seems nobody uses.
t-ishii@sra.co.jp
is a working 64-bit-int type available.
In playing around with it on my machine, I found that gcc provides
perfectly fine support for "long long" arithmetic ... but sprintf()
and sscanf(), which are system-supplied, don't work :-(. So the
autoconf test program does a cursory test on them too.
If we find that a lot of systems are like this, it might be worth
the trouble to implement binary<->ASCII conversion of int64 ourselves
rather than relying on sprintf/sscanf to handle the data type.
regards, tom lane
usernames and passwords work correctly in both "password" and
"crypt" authorization mode. NOTE: at least on my machine, it seems
that the crypt() routines ignore the part of the password beyond
8 characters, so there's no security gain from longer passwords in
crypt auth mode. But they don't fail.
The login-related part of psql has apparently not been touched
since roughly the fall of Rome ;-). It was going through huge
pushups to get around the lack of username/login parameters to
PQsetdb. I don't know when PQsetdbLogin was added to libpq, but
it's there now ... so I was able to rip out quite a lot of crufty
code while I was at it.
It's possible that there are still bogus length limits on username
or password in some of the other PostgreSQL user interfaces besides
psql/libpq. I will leave it to other folks to check that code.
regards, tom lane
with the new support for asynchronous NOTIFY in libpgtcl. With
the current sources, if the backend disconnects unexpectedly then
the tcl/tk application coredumps when control next reaches the idle
loop. Oops.
regards, tom lane
Summary of changes:
In pqcomm.h, use the SUN_LEN macro if it is defined to calculate
the size of the sockaddr_un structure.
In unixware.h, drop the use of the UNIXWARE macro. Everything can
be handled with the USE_UNIVEL_CC and DISABLE_COMPLEX_MACRO macros.
In s_lock.h, remove the reference to the UNIXWARE macro (see above).
In the unixware template, add the YFLAGS:-d line.
In various makefile templates, add (or cleanup) unixware and univel
port specific information.
-- Billy G. Allie
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;
in constraint clauses.
IN and NOT IN only allow constaints, not subselects.
Jose' Soares' new reference docs pointed out the discrepency.
Updating the docs too...
Sigh. That tweak needs a tweak --- I didn't realize that ".DEFAULT"
processing ignores dependencies, at least in the version of gmake I
have here (not sure if it's a bug or not). Apply this patch aftermy previous one...
From: Tom Lane <tgl@sss.pgh.pa.us>
Attached is a patch for this weekend's work on libpq. I've dealt
with several issues:
<for details: see message, in pgsql-patches archive for above data>
Bracket things with #ifdef ENABLE_LINE_TYPE.
The line data type has always been used internally to support other types,
but I/O routines have never been defined for it.
indices for restriction clauses containing a constant.
Note that if an index does not match directly (usually because the types
on both side of the clause don't match), and if a binary-compatible index
is identified, then the operator function will be replaced by a new
one. Should not be a problem, but be sure that if types are listed as
being binary compatible (in parse_coerce.h) then the comparison functions
are also binary-compatible, giving equivalent results.
trouble, and the name of the shared library has been changed recently.
Had to rerun ldconfig on my machine to get it working again.
Give an error message with a helpful hint if so...
functions btrim() ltrim() and rtrim().
The error was that the character after the set was included
in the tests (ptr2 pointed to the character after the vardata
part of set if no match found, so comparing *ptr or *end
against *ptr2 MAY match -> strip).
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being
right. # # Let's break this rule - forgive me.
# #======================================== jwieck@debis.com (Jan
Wieck) #
couple weeks ago on the hackers and interfaces lists:
1. When the backend sends a NOTICE message and closes the connection
(typically, because it was told to by the postmaster after
another backend coredumped), libpq will now print the notice
and close the connection cleanly. Formerly, the frontend app
would usually terminate ungracefully due to a SIGPIPE. (I am
not sure if 6.3.2 behaved that way, but the current cvs sources
do...)
2. libpq's various printouts to stderr are now fed through a single
"notice processor" routine, which can be overridden by the
application to direct notices someplace else. This should ease
porting libpq to Windows.
I also noticed and fixed a problem in PQprint: when sending output
to a pager subprocess, it would disable SIGPIPE in case the pager
terminates early (this is good) --- but afterwards it reset SIGPIPE
to SIG_DFL, rather than restoring the application's prior setting
(bad).
regards, tom lane