Commit Graph

866 Commits

Author SHA1 Message Date
Bruce Momjian cf169e0088 Spell fix 2000-05-26 03:15:18 +00:00
Tom Lane 69cc16f47e Quote database name so that not-all-lowercase names are handled safely. 2000-05-25 20:18:15 +00:00
Tom Lane 8b5b3e0011 pg_dump barfs on negative values for index column numbers --- like, say,
an index on a table's OID column.  Mea maxima culpa ... but how'd we get
through beta with no one noticing this?
2000-05-19 23:00:00 +00:00
Bruce Momjian 6cb0fff31d cleanup 2000-05-15 16:20:45 +00:00
Bruce Momjian dcec5ae2cd cleanup 2000-05-15 16:16:23 +00:00
Bruce Momjian 52831da26c Fix createlang -l dbname so it works, update sgml. 2000-05-15 16:12:39 +00:00
Peter Eisentraut d64aa21570 That psql option should be --no-readline (as it used to be), not --noreadline. 2000-05-14 18:05:05 +00:00
Bruce Momjian 6dedc79b1e Fix create user for pgaccess. 2000-05-14 00:50:16 +00:00
Bruce Momjian 40c992c7dd Back out -\?. Didn't look good to Peter. 2000-05-12 16:28:31 +00:00
Peter Eisentraut 9d31e3a991 /home/peter/commit-msg 2000-05-12 16:13:44 +00:00
Bruce Momjian 4624b84cf2 Small cleanup of file. 2000-05-12 00:54:53 +00:00
Bruce Momjian 7da0f5d7de More psql help cleanup 2000-05-11 18:41:00 +00:00
Bruce Momjian 8101d0c571 Makefile CFLAGS cleanups. 2000-05-11 17:46:35 +00:00
Bruce Momjian e10c5597b7 Display -? as -\? under unix for psql. 2000-05-11 03:14:19 +00:00
Bruce Momjian 0fbde5d928 Add options and cleanup psql \? and -? help displays 2000-05-11 01:37:54 +00:00
Bruce Momjian 5a75ad5573 Update psql \? to show file rather than "fname". 2000-05-09 19:08:36 +00:00
Tom Lane b45f3a6e5b Forgot that dumpall's output script should 'delete from pg_group' before
loading new data, for consistency with its handling of pg_shadow.
2000-05-05 17:50:38 +00:00
Peter Eisentraut 5e4d8be18b psql: suppress warnings about too many arguments if the command is not valid in the first place 2000-05-05 09:38:40 +00:00
Peter Eisentraut 8322072188 Spello SERIALIZED -> SERIALIZABLE in psql tab completion 2000-05-05 08:44:27 +00:00
Tom Lane 3a69c316cc Accept pg_group as well as pg_shadow data from dumpall script.
Rearrange handling of VACUUMs so that they are certain to be executed
as superuser not some random user; also, do not forget to vacuum
template1 itself.
2000-05-05 03:08:20 +00:00
Tom Lane 3d1461802e Dump contents of pg_group along with pg_shadow. 2000-05-05 03:04:00 +00:00
Bruce Momjian 00645eb1fd Fix include "" to <> 2000-04-26 22:51:14 +00:00
Bruce Momjian 0b65e1436e Add res clear to example 2000-04-26 17:51:03 +00:00
Peter Eisentraut 282861ad75 initdb didn't always remove temp file 2000-04-25 08:29:02 +00:00
Tatsuo Ishii e308786889 Update pg_ctl so that it does not redirect outputs from postmaster
to a temp file.
2000-04-25 01:07:23 +00:00
Bruce Momjian 297e7f3ef4 Fix \h to not go past array bounds 2000-04-24 22:41:43 +00:00
Tom Lane f084cc4939 Fix still more static-declaration-vs-nonstatic-definition glitches.
gcc doesn't think these are a problem, but somewhere out there is a
compiler that will spit up.
2000-04-21 03:01:54 +00:00
Peter Eisentraut 3d62fbc4eb squished \dS+ bug pointed out by Mike Mascari 2000-04-16 20:04:51 +00:00
Tom Lane ea46ddcfa6 Tweak create_help.pl so it will work under either perl 4.* or perl 5.*.
Remove knowledge of path to documentation source directory from perl
script, instead have Makefile pass it to script.
2000-04-16 18:07:22 +00:00
Peter Eisentraut aae70b2dca more psql bug squashing:
\copy without arguments failed
commands with too many arguments were too silent
2000-04-16 15:46:40 +00:00
Tatsuo Ishii 88a30e68f6 Change postmaster.opts.default.sample. remove -S option.
With the default option, pg_ctl can show messages from
postmaster upon its failure.
2000-04-16 03:50:00 +00:00
Peter Eisentraut ffc9812451 fixed another psql \e bug (handle newlines as whitespace)
repaired psql option scanning bug (special treatment to \g |pipe)
fixed ipcclean makefile
made configure look for Perl to handle psql help build gracefully
2000-04-14 23:43:44 +00:00
Tom Lane 07d2c3e0a0 Another static-vs-not-static error. 2000-04-14 01:34:24 +00:00
Bruce Momjian 52f77df613 Ye-old pgindent run. Same 4-space tabs. 2000-04-12 17:17:23 +00:00
Bruce Momjian 354a39bc44 Clean up temp files from \e. 2000-04-11 17:35:50 +00:00
Bruce Momjian 949e8a662d Add colo to display at end of initdb. 2000-04-08 18:35:30 +00:00
Bruce Momjian a25a490718 Update initdb display of postmaster startup 2000-04-06 18:27:01 +00:00
Bruce Momjian 0d26b45618 No ID file needed. 2000-04-04 13:51:38 +00:00
Bruce Momjian 9e7a4ccfd0 Update QNX FAQ 2000-04-04 13:49:30 +00:00
Tom Lane c84ba6638e Add a check to pg_dump to see whether backend is same version as pg_dump.
If not, abort by default.  Abort can be prevented by using -i or
--ignore-version switch.
2000-04-04 05:22:46 +00:00
Bruce Momjian 51cfdae50f Hi,
here is an updated version of the bit type with a bugfix and all the necessa
ry
SQL functions defined. This should replace what is currently in contrib. I'd
appreciate any comments on what is there.

Kind regards,

Adriaan
2000-04-03 20:56:40 +00:00
Bruce Momjian ac70c3547b I have tested the beta3 on WinNT and here are the results:
- I was unable to compile ecpg due to the ":=" instead of "=" in defining
LIBPQDIR and some other variables in Makefile.global.in
- pg_id (and also pg_encoding) executable was not removed during "make
clean" - there was no $(X) appended to the executable name for rm
- I have added result for int2, int4, float8 and geometry regression tests
        - int2, int2 - yet another message for too large numbers ;-)
        - float8 - it is problably a bug in the newlib C library - it has no
error message for numbers with exponent -400
        - geometry - differences in precision of float numbers
- I have added appropriate lines into resultmap file
- I have modified the script regress.sh to use "case" statement when testing
the hostname. For cygwin the script is called with "i686-pc-cygwin" (on my
machine) as a parameter and this was not catched with the "if" statement.
The check was done for PORTNAME (win) and not HOSTNAME (i.86-pc-cygwin*).

The patch for described modifications is included.

All this modifications can be applied to "current" tree too.
The compilation was done on CygwinB20.1 with gcc 2.95, cygipc library 1.05.
The binaries were able to run also on the newest development snapshot
(2000-03-25).

                        Dan
2000-03-31 14:14:36 +00:00
Bruce Momjian 51bacfd44b Fix pgaccess __wish__ thing. 2000-03-31 14:05:07 +00:00
Bruce Momjian 472c5196f4 Add new pgaccess languages. 2000-03-31 11:30:10 +00:00
Bruce Momjian a34ce62fdf Update pgaccess to 0.98.5 2000-03-31 11:22:36 +00:00
Peter Eisentraut a9f37f16d2 Fixed bug with repeated \e in psql (failed to clear buffers correctly) 2000-03-27 21:11:37 +00:00
Tatsuo Ishii a92ab528ef Enhance pg_ctl so that it prints error messages from postmaster
if it fails to start up it (this is only vaild if -w is given).
2000-03-27 02:12:03 +00:00
Peter Eisentraut 4579e68db2 Updated user's guide to match new psql's output format
Fixed bug in createdb/alternative location
2000-03-26 18:32:30 +00:00
Tom Lane e4739e7029 Old patch from Mark Hollomon to add plperl to createlang's repertoire.
Seems to have slipped through the cracks.
2000-03-25 19:10:27 +00:00
Tom Lane cfc0ba8c04 Another fix for old shells. 2000-03-25 19:01:48 +00:00
Tom Lane c446802b22 Fix syntax error reported by old shells ("if ! command..." is a
neologism, apparently).
2000-03-25 18:46:17 +00:00
Bruce Momjian 1aecb8d2ff More >&1 cleanups 2000-03-25 14:44:42 +00:00
Bruce Momjian 3df65f8499 More changes of >& to 2>&1 2000-03-25 14:36:58 +00:00
Bruce Momjian 6e801bd8db Remove >& and make it 2>&1 2000-03-25 14:32:50 +00:00
Bruce Momjian d825e55c13 Update pg_dumpall again. 2000-03-22 05:25:06 +00:00
Bruce Momjian 233a52eaff Fix pg_dumpall for new psql output. 2000-03-22 05:10:22 +00:00
Bruce Momjian 52d0265736 it seems in the beta2 release DBUSERID in pg_dumpall is the _name_ of the
user, so it doesn't need to be translated from the number to the name.

also ``create database ...'' does not take numbers for the encoding, so
the ENCODING variable does not need to be translated to a number, but left
as the text representation.  a patch is supplied to make the changes i
have found to work.  i was successful dumping and reloading my database
after these changes.
-

John M. Flinchbaugh
2000-03-19 02:19:43 +00:00
Peter Eisentraut 7d392f257b Fixed psql -c "\slashcmd" 2000-03-18 22:48:29 +00:00
Tom Lane f945f46193 Modify lexing of multi-char operators per pghackers discussion around
16-Mar-00: trailing + or - is not part of the operator unless the operator
also contains characters not present in SQL92-defined operators.  This
solves the 'X=-Y' problem without unduly constraining users' choice of
operator names --- in particular, no existing Postgres operator names
become invalid.

Also, remove processing of // comments, as agreed in the same thread.
2000-03-18 18:03:12 +00:00
Tom Lane 0e314d747e Add safety check on expression nesting depth. Default value is set by
a config.h #define, and the runtime value can be controlled via SET.
2000-03-17 05:29:07 +00:00
Thomas G. Lockhart 6456810078 Implement column aliases on views "CREATE VIEW name (collist)".
Implement TIME WITH TIME ZONE type (timetz internal type).
Remap length() for character strings to CHAR_LENGTH() for SQL92
 and to remove the ambiguity with geometric length() functions.
Keep length() for character strings for backward compatibility.
Shrink stored views by removing internal column name list from visible rte.
Implement min(), max() for time and timetz data types.
Implement conversion of TIME to INTERVAL.
Implement abs(), mod(), fac() for the int8 data type.
Rename some math functions to generic names:
 round(), sqrt(), cbrt(), pow(), etc.
Rename NUMERIC power() function to pow().
Fix int2 factorial to calculate result in int4.
Enhance the Oracle compatibility function translate() to work with string
 arguments (from Edwin Ramirez).
Modify pg_proc system table to remove OID holes.
2000-03-14 23:06:59 +00:00
Tatsuo Ishii 44a9639123 Detect postmaster being ready by calling psql -l rathern than
checking postmaster.pid. It's not enough to check the existence
of postmaster.pid since DB recovery might be running.
2000-03-14 08:34:47 +00:00
Peter Eisentraut a1642089bf Fixed deficiency where an unterminated (no semicolon) command at end of
psql script would be dropped silently.
2000-03-13 13:46:32 +00:00
Peter Eisentraut 1d75298176 Karel Zakr's revised patch to fix psql prompt for local host connections. 2000-03-11 13:56:24 +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 326e2155d9 Hi Peter,
I try change prompt in the psql, but it is set '.' (as '%m') for
non-TCP/IP
connection. This small patch try use uname() information for non-TCP/IP
instead '.'.

                                        Karel
2000-03-08 01:38:59 +00:00
Bruce Momjian 91124a2f66 Fix problems with pg_upgrade found by Kardos, Dr. Andrea 2000-03-07 23:09:34 +00:00
Peter Eisentraut 8de482a847 Added configure test for readline's filename_completion_function
Completed psql's \? help
2000-03-05 13:30:20 +00:00
Peter Eisentraut c75adac757 More fixes for psql ^C handling, especially during copy. Still doesn't
cope so well with copy to but that will have to wait for the next release.

Also added -X option to prevent reading .psqlrc startup file.
2000-03-01 21:10:05 +00:00
Tom Lane ed0e292354 Clean up dependencies for version.o.
This avoids the useless rebuild of pg_version that used to happen on
each build or install pass.
2000-02-27 01:33:43 +00:00
Tom Lane 01eea27c4c Fix a couple of inconsistent usages of include <...> vs. include "...". 2000-02-27 01:10:31 +00:00
Tom Lane cbf4c9671e psql's \d command wasn't doing the right things with 'char' (type 18)
fields, nor with bpchar and varchar fields that have typmod -1.  The
latter effectively have an unspecified length, so I made them display
as char() and varchar() rather than falsely equating them to char(1)
and varchar(1).
2000-02-26 18:31:25 +00:00
Bruce Momjian c969e2662f 1. miscadmin.h needs to include sys/types.h for a definition of pid_t
2. Regression tests fail for types int2 and int4 (which can easily be
fixed by adding entries to resultmap) aswell as float8 and geometry,
where floating point numbers appear to be rounded a little differently
than in your expected results (besides that I also need the positive
zeros file). I'm including a patch for the first 2, but I don't know
whether the latter two are actually a bug in postgres or a bug in the
OS or even allowed difference. I'm including my results for reference.

Rolf Grossmann
2000-02-23 15:46:15 +00:00
Peter Eisentraut c8009959c9 Fixed psql's Control-C handling when COPY in progress 2000-02-21 19:40:42 +00:00
Tatsuo Ishii 320d3e06ee Fixes for \encoding command.
1) freeing null pointer
	2) invalid encoding info may be stored into psql variable
	3) fix indentation
2000-02-21 02:05:12 +00:00
Peter Eisentraut 718bb2cc9c Moved psql \eset and \eshow to \encoding
Improved psql's Ctrl-C handling
Fixed configure test for sigsetjmp that now even recognizes it if it's a macro
2000-02-20 14:28:28 +00:00
Tom Lane e79b2dd5e7 Fix missing \n in some psql_error calls. 2000-02-20 02:37:40 +00:00
Tatsuo Ishii eb089e7f76 Add new backslash command \eset and \eshow. 2000-02-19 05:01:16 +00:00
Tatsuo Ishii c239c11a63 Fix compiler warning 2000-02-19 04:59:30 +00:00
Bruce Momjian a52692213c README not needed anymore. 2000-02-16 21:26:00 +00:00
Bruce Momjian 988d53e5ea include cleanup 2000-02-16 13:22:00 +00:00
Bruce Momjian 78693c89d7 Clean up include files use in psql. 2000-02-16 13:15:26 +00:00
Tom Lane b1577a7c78 New cost model for planning, incorporating a penalty for random page
accesses versus sequential accesses, a (very crude) estimate of the
effects of caching on random page accesses, and cost to evaluate WHERE-
clause expressions.  Export critical parameters for this model as SET
variables.  Also, create SET variables for the planner's enable flags
(enable_seqscan, enable_indexscan, etc) so that these can be controlled
more conveniently than via PGOPTIONS.

Planner now estimates both startup cost (cost before retrieving
first tuple) and total cost of each path, so it can optimize queries
with LIMIT on a reasonable basis by interpolating between these costs.
Same facility is a win for EXISTS(...) subqueries and some other cases.

Redesign pathkey representation to achieve a major speedup in planning
(I saw as much as 5X on a 10-way join); also minor changes in planner
to reduce memory consumption by recycling discarded Path nodes and
not constructing unnecessary lists.

Minor cleanups to display more-plausible costs in some cases in
EXPLAIN output.

Initdb forced by change in interface to index cost estimation
functions.
2000-02-15 20:49:31 +00:00
Peter Eisentraut 9672d38f91 Adjusted psql echoing options (-a and -e) 2000-02-13 21:45:15 +00:00
Peter Eisentraut 2fb0ff0c5b Default argument for createdb
Changed EXIT_ON_ERROR to ON_ERROR_STOP in psql
2000-02-10 20:08:58 +00:00
Bruce Momjian 566c05c31a Here is the patch to add plperl to droplang.
Mark Hollomon
2000-02-09 20:23:26 +00:00
Bruce Momjian ecd8537376 I checked the WinNT port yesterday (a few days old snapshot from CVS) and I
am including a patch to get it compile.

changes to psql:
- added less as default pager when compiling on Cygwin
- need to declare "filename_completion_function" because it is not exported
from readline -> added to include/port/win.h

changes to pg_id:
- include of <getopt.h>
- add .exe when installing

I think there is a problem with calling the regress tests on WinNT - it
should be called with PORTNAME not HOST as the parameter to regress.sh or
the check  when to add "-h localhost" to psql has to be changed. Now it is
checked against the PORTNAME.

The results of the regress tests were OK with expected failures ;-)

Daniel Horak
2000-02-09 16:23:44 +00:00
Peter Eisentraut 9e34883565 Fixed broken initdb --show patch 2000-02-09 00:21:49 +00:00
Bruce Momjian 1cc7e40c80 yesterday I had a problem with initdb. I set bad environment values
and initdb crashs (I set pglib path to PG 6.5.3 directory instead to
7.0 and initdb take this BKI old templates ... (initdb not check
BKI version and BKI files not has any version comments (TODO?))

 This patch add to the initdb --show option which show setting of all
initdb's values. It spare developers time if in setting is bug.

                                                Karel

----------------------------------------------------------------------
Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
2000-02-08 15:58:54 +00:00
Peter Eisentraut 9ceb5d8a7b Fixed psql double quoting of SQL ids
Fixed libpq printing functions
2000-02-07 23:10:11 +00:00
Jan Wieck f1acd900ad Disable/reenable triggers for data only dump.
Jan
2000-02-07 16:30:58 +00:00
Tatsuo Ishii 2bda7a4406 change copyright year 1999->2000
Minor fix
2000-02-07 04:31:10 +00:00
Tatsuo Ishii 418b270020 Fix a bug when specfying -D option.
fix suggested by Keith Parks.
2000-02-06 00:49:03 +00:00
Tatsuo Ishii b304b4a90e Change function name PQclientencoding to PQclientEncoding since
it seems more suitable for the naming convention in libpq.
2000-02-05 12:27:56 +00:00
Jan Wieck ddd596d386 Added ALTER TABLE ... ADD CONSTRAINT (provided by Stephan Szabo).
Added constraint dumping capability to pg_dump (also from Stephan)

Fixed DROP TABLE -> RelationBuildTriggers: 2 record(s) not found for rel
error.

Fixed little error in gram.y I made the last days.

Jan
2000-02-04 18:49:34 +00:00
Peter Eisentraut 2ea31fabe7 *** empty log message *** 2000-02-02 13:20:15 +00:00
Peter Eisentraut 2b84cbb60f A few minor psql enhancements
Initdb help correction
Changed end/abort to commit/rollback and changed related notices
Commented out way old printing functions in libpq
Fixed a typo in alter table / alter column
2000-01-29 16:58:54 +00:00
Bruce Momjian 3f0074e403 fix for compile. 2000-01-27 05:33:51 +00:00
Bruce Momjian 2d5dd7557b Update files. 2000-01-26 16:10:01 +00:00
Bruce Momjian 5c25d60244 Add:
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc

to all files copyright Regents of Berkeley.  Man, that's a lot of files.
2000-01-26 05:58:53 +00:00