Bruce Momjian [Sat, 22 Aug 1998 04:49:05 +0000 (04:49 +0000)]
With the attached patch, I have verified that long (> 8char anyway)
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.
Bruce Momjian [Sat, 22 Aug 1998 04:34:22 +0000 (04:34 +0000)]
The attached patch fixes a problem that I seem to have introduced
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.
Bruce Momjian [Wed, 19 Aug 1998 02:04:17 +0000 (02:04 +0000)]
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;
Bring document list closer to up to day.
Add a note on sgml-tools that they are now working with jade and so
may become the toolset of choice in the future.
Update the random test so it should succeed most of the time.
Instead of directly showing the random results, test the results
for the expected behavior (range and randomness).
Allow NOT LIKE, IN, NOT IN, BETWEEN, and NOT BETWEEN expressions
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...
Marc G. Fournier [Mon, 17 Aug 1998 03:53:37 +0000 (03:53 +0000)]
From: Tom Lane <tgl@sss.pgh.pa.us>To: pgsql-patches@postgreSQL.org
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...
Marc G. Fournier [Mon, 17 Aug 1998 03:50:43 +0000 (03:50 +0000)]
Date: Sun, 16 Aug 1998 14:56:48 -0400
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>
Here is some more contrib-fodder, based on TIH's IP address type,
for ISBN and ISSN identifiers (which I just happened to need to keep
track of the things in my library).
Allow a null pointer to be returned from get_opname().
Previously, had thrown an error, but looking for alternate strategies
for table indices utilization would prefer to continue.
Check for null pointer returned from get_opname().
Don't bother checking for alternate strategies if so
since it was more likely a function or some other non-operator anyway.
Disable not-ready-to-use support code for the line data type.
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.
Include a sentence in the top pointing to the new docs.
pgbuiltin.3 is obsolete for sure, and libpq.3 can become so since the
size and scope of this man page is not appropriate in a man page format.
Information moved to sgml source files.
The "Oracle compatibility" page should have always been in with functions
anyway. The BKI information is not really appropriate for a man page.
Nice exposition on indices and keys from Herouth Maoz which appeared
on the mailing lists a while ago. Maybe slightly changed to fit docs.
Will go into the User's Guide.
Remove single-argument trim() function from table.
Never seen because the parser frontend converts all trim() calls to
btrim(), ltrim(), and rtime() calls before execution.
Allow binary-compatible indices to be considered when checking for valid
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.
Check for bad result from pg_id. A bad result can come from shared library
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...
Bruce Momjian [Tue, 11 Aug 1998 18:38:07 +0000 (18:38 +0000)]
the following patch fixes a bug in the oracle compatibility
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) #
Bruce Momjian [Sun, 9 Aug 1998 02:59:33 +0000 (02:59 +0000)]
The attached patch implements some changes that were discussed a
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).
I have attached a patch to allow GROUP BY and/or ORDER BY function or
expressions. Note worthy items:
1. The expression or function need not be in the target list.
Example:
SELECT name FROM foo GROUP BY lower(name);
2. Simplified the grammar to use expressions only.
3. Cleaned up earlier patch in this area to make use of existing
utility functions.
3. Reduced some of the members in the SortGroupBy parse node. The
original data members were redundant with the new expression node.
(MUST do a "make clean" now)
4. Added a new parse node "JoinUsing". The JOIN USING clause was
overloading this SortGroupBy structure. With the afore mentioned
reduction of members, the two clauses lost all their commonality.
5. A bug still exist where, if a function or expression is GROUPed BY,
and an aggregate function does not include a attribute from the
expression or function, the backend crashes. (or something like
that) The bug pre-dates this patch. Example:
SELECT lower(a) AS lowcase, count(b) FROM foo GROUP BY lowcase;
*** BOOM ***
--Also when not in target list
SELECT count(b) FROM foo GROUP BY lower(a);
*** BOOM AGAIN ***
Allows the following query to succeed: "SELECT NULL ORDER BY 1;"
There are three or four cases in transformSortClause() and I had fixed
only one case for UNION. A second case is now fixed, in the same way; I
assigned INT4OID to the column type for the "won't actually happen"
sort. Didn't want to skip the code entirely, since the backend needs to
_try_ a sort to get the NULLs right. I'm not certain under what
circumstances the other cases are invoked and these are not yet
fixed up, though perhaps they don't need to be...
Adrian Hall reported a problem to me that snprintf() doesn't exist in, at
least, Solaris 2.5.1. We use it in backend/utils/adt/int8.c.
Add a check to configure so that we see if it exists or not, and, if not,
compile in snprintf.c from backend/port, which was taken from, and falls under
the same Berkeley license as us, the FreeBSD libc/stdio ...