Commit Graph

4337 Commits

Author SHA1 Message Date
Peter Eisentraut fd5e95971e Remove old file. 2001-09-19 21:28:55 +00:00
Peter Eisentraut 9e774ca45e Avoid unnecessary strcasecmp -- replace by strcmp. Fixes reported bug
that made setting serializable isolation level impossible in Turkish
locale.
2001-09-19 15:19:12 +00:00
Peter Eisentraut 3baf7400d9 Replace useless strcasecmp's by strcmp's. 2001-09-19 09:48:42 +00:00
Tom Lane 89fa551808 EXPLAIN ANALYZE feature to measure and show actual runtimes and tuple
counts alongside the planner's estimates.  By Martijn van Oosterhout,
with some further work by Tom Lane.
2001-09-18 01:59:07 +00:00
Tom Lane 052c2eaa65 Simplify and clean up FigureColname; make it work without coredumping
for TypeCast case.
2001-09-17 01:06:36 +00:00
Tom Lane 220ae48cca Suppress compiler warning. 2001-09-17 00:29:10 +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 c1fbf06654 > Here's a revised patch. Changes:
>
> 1. Now outputs '\\' instead of '\134' when using encode(bytea, 'escape')
> Note that I ended up leaving \0 as \000 so that there are no ambiguities
> when decoding something like, for example, \0123.
>
> 2. Fixed bug in byteain which allowed input values which were not valid
> octals (e.g. \789), to be parsed as if they were octals.
>
> Joe
>

Here's rev 2 of the bytea string support patch. Changes:

1. Added missing declaration for MatchBytea function
2. Added PQescapeBytea to fe-exec.c
3. Applies cleanly on cvs tip from this afternoon

I'm hoping that someone can review/approve/apply this before beta starts, so
I guess I'd vote (not that it counts for much) to delay beta a few days :-)

Joe Conway
2001-09-14 17:46:40 +00:00
Peter Eisentraut dfdbf6898f max_locks_per_transaction seems to be a more consistent name than
max_locks_per_xact.
2001-09-12 14:06:37 +00:00
Bruce Momjian 21a7fa8a6f It is not fixed and I doubt that it is working fine in current CVS. The
bugfix is in the attached patch. Please apply it. Thanks.

 Output must be:

test=# SELECT to_char(485, 'RN');
     to_char
-----------------
         CDLXXXV
(1 row)

test=# SELECT to_char(485, 'FMRN');
 to_char
---------
 CDLXXXV
(1 row)

test=# SELECT to_char(1000, 'RN');
     to_char
-----------------
               M
(1 row)


test=# SELECT to_char(7.2, '"Welcome to"9.9 "release! :-)"');
           to_char
-----------------------------
 Welcome to 7.2 release! :-)
(1 row)

Karel Zak
2001-09-12 04:01:57 +00:00
Tatsuo Ishii 7e99cea816 Implement following item in TODO:
* Reject character sequences those are not valid in their charset
2001-09-11 05:18:59 +00:00
Tatsuo Ishii e1de3e0833 Implement following item in TODO:
* Reject character sequences those are not valid in their charset
2001-09-11 04:50:36 +00:00
Peter Eisentraut 8f3627d89b Add explicit '-print' to 'find' commands.
(partially) from Ian Lance Taylor
2001-09-10 22:25:48 +00:00
Bruce Momjian d70a944e0a Bug #1: attribute name when column is type cast:
Given the following table:

test=# \d f
          Table "f"
 Column |  Type   | Modifiers
--------+---------+-----------
 i      | integer |
 test   | text    |

If I do the following:

test=# insert into f values(1,'test');
INSERT 139549 1
test=# select i::int8,test from f;
 ?column? | test
----------+------
        1 | test
(1 row)

It doesn't make much sense that the first column should be called
'?column?'.

The patch results in the output appearing like this:

test=# select i::int8,test from f;
 i | test
---+------
 1 | test
(1 row)

----------

Gavin Sherry
2001-09-10 14:53:10 +00:00
Tatsuo Ishii d330f09a56 Backout Karel's patch 2001-09-09 01:15:11 +00:00
Hiroshi Inoue fc5ec424ab Apply 7.1.3 changes to the current tree also. 2001-09-08 16:15:28 +00:00
Peter Eisentraut c0d4d5473a Make the world somewhat safe for (not from) DELETE FROM pg_shadow;
Assign the fixed user id 1 to the user created by initdb.
A stand-alone backend will always set the user id to 1.
(Consequently, the name of that user is no longer important.)

In stand-alone mode, the user id 1 will have implicit superuser
status, to allow repairs even if there are no users defined.

Print a warning message when starting in stand-alone mode when no
users are defined.

Disallow dropping the current user and session user.

Granting/revoking superuser status also grants/revokes usecatupd.
(Previously, it would never grant it back.  This could lead to "deadlocks".)

CREATE USER and CREATE GROUP will start allocating user ids at 100
(unless explicitly specified), to prevent accidental creation of a
superuser (plus some room for future extensions).
2001-09-08 15:24:00 +00:00
Bruce Momjian fdbf796f36 > > A simple and robus solution is in the begin of mbutils.c set default
> > ClientEncoding to SQL_ASCII (like default DatabaseEncoding). Bruce, can
> > you change it? It's one line change. Again thanks.

 Forget it! A default client encoding must be set by actual database encoding...
Please apply the small attached patch that solve it better.

Karel Zak
2001-09-08 14:30:15 +00:00
Tom Lane 02b1a7fd51 Clean up some confusion about where and how to set whereToSendOutput.
We will no longer try to send elog messages to the client before we have
initialized backend libpq (oops); however, reporting bogus commandline
switches via elog does work now (not irrelevant, because of PGOPTIONS).
Fix problem with inappropriate sending of checkpoint-process messages
to stderr.
2001-09-08 01:10:21 +00:00
Tom Lane 09e99a1082 Change addlit() to not assume its input is null-terminated, so that we
don't have more bugs like the quote-quote-quote-quote one.  Propagate
fix into ecpg lexer, too.
2001-09-07 23:17:14 +00:00
Bruce Momjian bd9b32803b Here is my much-promised patch to let people add UNIQUE constraints after
table creation time.  Big deal you say - but this patch is the basis of the
next thing which is adding PRIMARY KEYs after table creation time.  (Which
is currently impossible without twiddling catalogs)

Rundown
-------

* I have made the makeObjectName function of analyze.c non-static, and
exported it in analyze.h

* I have included analyze.h and defrem.h into command.c, to support
makingObjectNames and creating indices

* I removed the 'case CONSTR_PRIMARY' clause so that it properly fails and
says you can't add primary keys, rather than just doing nothing and
reporting nothing!!!

* I have modified the docs.

Algorithm
---------

* If name specified is null, search for a new valid constraint name.  I'm
not sure if I should "lock" my generated name somehow tho - should I open
the relation before doing this step?

* Open relation in access exclusive mode

* Check that the constraint does not already exist

* Define the new index

* Warn if they're doubling up on an existing index

Christopher Kings-Lynne
2001-09-07 21:57:53 +00:00
Tom Lane 17c03b30b0 Revert treatment of NOTIFY in rules to its pre-7.1 behavior: notify will
occur unconditionally, even if the rule should otherwise execute
conditionally.  This is more useful than giving an error, even though it's
not truly the correct behavior.  Per today's pghackers discussion.
2001-09-07 20:52:31 +00:00
Bruce Momjian 8c55728295 Add CRED alignment for NetBSD. 2001-09-07 19:59:04 +00:00
Bruce Momjian a7621c92ae Update SCM_CREDS for Net/Free/BSD-OS. Add configure checks. 2001-09-07 19:52:54 +00:00
Jan Wieck 7e26a8241d Enable SIGTERM and SIGQUIT during client authentication so
the postmaster can kill the forked off processes when shutdown
is requested.

Jan
2001-09-07 16:12:49 +00:00
Bruce Momjian d9044b5637 Remove file, per Karel. 2001-09-07 15:14:16 +00:00
Bruce Momjian 4ea26bf354 Remove variable length macros used in debugging, per Karel. 2001-09-07 15:01:45 +00:00
Bruce Momjian 7bfc83f673 Remove unused files for Karel's patch. 2001-09-07 14:17:17 +00:00
Bruce Momjian 9f5185cf63 Remove common.c, removed in Karal's patch. 2001-09-07 14:00:25 +00:00
Tatsuo Ishii 3bdd67a203 Add missing files. 2001-09-07 03:32:11 +00:00
Tom Lane 0fc7779d2e Revise overflow test in int84() to avoid codegen bug in some older
versions of gcc.  We don't really need to explicitly test the limits
anyway, just reverse-convert and see if we get the same answer.
2001-09-07 01:33:44 +00:00
Tom Lane e67bb7af5a Missed a few places that referred to a compile-time limit on
max_connections.
2001-09-07 00:46:42 +00:00
Tom Lane 863aceb54f Get rid of PID entries in shmem hash table; there is no longer any need
for them, and making them just wastes time during backend startup/shutdown.
Also, remove compile-time MAXBACKENDS limit per long-ago proposal.
You can now set MaxBackends as high as your kernel can stand without
any reconfiguration/recompilation.
2001-09-07 00:27:30 +00:00
Tatsuo Ishii 227767112c Commit Karel's patch.
-------------------------------------------------------------------
Subject: Re: [PATCHES] encoding names
From: Karel Zak <zakkr@zf.jcu.cz>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-patches <pgsql-patches@postgresql.org>
Date: Fri, 31 Aug 2001 17:24:38 +0200

On Thu, Aug 30, 2001 at 01:30:40AM +0200, Peter Eisentraut wrote:
> > 		- convert encoding 'name' to 'id'
>
> I thought we decided not to add functions returning "new" names until we
> know exactly what the new names should be, and pending schema

 Ok, the patch not to add functions.

> better
>
>     ...(): encoding name too long

 Fixed.

 I found new bug in command/variable.c in parse_client_encoding(), nobody
probably never see this error:

if (pg_set_client_encoding(encoding))
{
	elog(ERROR, "Conversion between %s and %s is not supported",
                     value, GetDatabaseEncodingName());
}

because pg_set_client_encoding() returns -1 for error and 0 as true.
It's fixed too.

 IMHO it can be apply.

		Karel
PS:

    * following files are renamed:

src/utils/mb/Unicode/KOI8_to_utf8.map  -->
        src/utils/mb/Unicode/koi8r_to_utf8.map

src/utils/mb/Unicode/WIN_to_utf8.map  -->
        src/utils/mb/Unicode/win1251_to_utf8.map

src/utils/mb/Unicode/utf8_to_KOI8.map -->
        src/utils/mb/Unicode/utf8_to_koi8r.map

src/utils/mb/Unicode/utf8_to_WIN.map -->
        src/utils/mb/Unicode/utf8_to_win1251.map

   * new file:

src/utils/mb/encname.c

   * removed file:

src/utils/mb/common.c

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
2001-09-06 04:57:30 +00:00
Bruce Momjian 04c1f72920 PAM authentication:
> pam_strerror() should be used a few more times, rather than just saying
> "Error!".  Also, the configure.in snippet seems wrong.  You add
> -I$pam_prefix/include/security to $INCLUDES and then you #include
> <security/pam_appl.h>.  This whole thing is probably unnecessary, since
> PAM is a system library on the systems where it exists, so the headers
> and libraries are found automatically, unlike OpenSSL and
> Kerberos.

See attached revised patch. (I'm sure the configure.in stuff can be done
right/better, I'm just not enough of a autoconf guru to know what to
change it to.)

Dominic J. Eidson
2001-09-06 03:23:38 +00:00
Bruce Momjian 2a34134b6c - new to_char(interval, text)
- new millisecond (ms) and microsecond (us) support
 - more robus parsing from string - used is separator checking for
   non-exact formats like to_date('2001-9-1', 'YYYY-MM-DD')
 - SGML docs are included

Karel Zak
2001-09-06 03:22:42 +00:00
Tom Lane 6c91eef7b7 Fix handling of pg_type.typdefault per bug report from Dave Blasby.
If there's anyone out there who's actually using datatype-defined
default values, this will be an incompatible change in behavior ...
but the old behavior was so broken that I doubt anyone was using it.
2001-09-06 02:07:42 +00:00
Tom Lane f2b604ecf4 Add some debugging details to some of the elog(STOP) conditions for WAL.
Standardize on %X/%X as the formatting for XLOG position display --- we
had a couple of different formats before, and none of 'em were as useful
as hex offsets IMHO.
2001-09-06 02:02:48 +00:00
Tom Lane 763554393a Fix code so that we recover cleanly if there are no free semaphores
available in freeSemMap.  As noted by Tatsuo, this is now a likely
scenario for detecting MaxBackends-exceeded; if MaxBackends is a multiple
of PROC_NSEMS_PER_SET then we will fail here and not in sinval.c.  The
cleanup path did not work correctly before, anyway.
2001-09-04 21:42:17 +00:00
Tom Lane 936114a019 Fix comment, add Assert. 2001-09-04 19:12:05 +00:00
Tom Lane bc1a61a30d Fix typo. 2001-09-04 19:05:59 +00:00
Tom Lane b553cba15a Clean up the lock state properly when aborting because of early deadlock
detection in ProcSleep().  Bug noted by Tomasz Zielonka --- how did this
escape detection for this long??
2001-09-04 02:26:57 +00:00
Peter Eisentraut 3c59a9e3b7 Bring references to ipcclean in sync with reality. 2001-09-04 00:22:34 +00:00
Peter Eisentraut 309401a7b6 Fix misscanning of """" (an identifier consisting of one double-quote). 2001-09-04 00:19:39 +00:00
Peter Eisentraut 68e5360018 Convert some fprintf's to elog's. 2001-08-30 19:02:42 +00:00
Peter Eisentraut b1a38a4380 Install the SQL command man pages into a section appropriate for each
system.  Some systems did not understand the 'l' section, and in general
it wasn't entirely appropriate.

On SCO OpenServer, the man pages won't be installed at all until someone
figures out their man system.
2001-08-29 19:14:40 +00:00
Peter Eisentraut f45b7270b6 Whoops, wrong logic. 2001-08-29 11:54:12 +00:00
Peter Eisentraut dd225655b9 Change the conditionals so the mips + gcc code here doesn't apply for Irix.
The code in s_lock.h should get used.

report from Bruno Mattarollo <bruno@web1.greenpeace.org>
2001-08-28 15:04:27 +00:00
Tom Lane 545c6696a6 Fix confusion over static-ness of a subroutine. 2001-08-27 20:03:38 +00:00
Tom Lane bc7d37a525 Transaction IDs wrap around, per my proposal of 13-Aug-01. More
documentation to come, but the code is all here.  initdb forced.
2001-08-26 16:56:03 +00:00