Commit Graph

866 Commits

Author SHA1 Message Date
Bruce Momjian a08eb45c52 More initdb cleanup 1999-12-18 02:56:01 +00:00
Bruce Momjian 24edd34da5 Cleanup of initdb.sh script to be portable, at least marginally. 1999-12-18 02:48:53 +00:00
Bruce Momjian 65f694f802 Add cvs. 1999-12-18 00:34:48 +00:00
Bruce Momjian 5c99f9cd84 Fix MULTIBYTE handling in string by using strcat. 1999-12-17 18:05:32 +00:00
Jan Wieck 219652d5f7 Okay, this is how it looks: Please apply the attached patch to the current
sources, otherwise this whole things fails anyway (fails to create the
views).

Peter Eisentraut

Manually applied - Jan
1999-12-17 16:53:11 +00:00
Bruce Momjian 4f73187bb7 ANother initdb cleanup 1999-12-17 03:46:33 +00:00
Bruce Momjian ac00256ceb initdb.sh fix from Peter. 1999-12-17 01:16:03 +00:00
Bruce Momjian 83bad7c063 This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.

Please take a look at this and adopt it if you feel it's safe enough. I
have simulated all the stupid circumstances I could think of, but you
never know with shell scripts.

Oh yeah, you can give the postgres user a default password now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-17 01:05:31 +00:00
Bruce Momjian 1b22a8cb03 Clear paren level flag on \r or any backslash command, rather than
keeping parenlevel unchanged.
1999-12-16 23:54:41 +00:00
Bruce Momjian 5ca971a18a Hi,
I sending promised patch with:

        * getopt_long() - for pg_dump (portable)

        * and "Usage: " changes in scripts in src/bin/
          - this changes are cosmetic only, not change any
          feature ...etc.

 All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.

                                                Karel

Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
1999-12-16 20:10:02 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian cb00b7faa5 I'm in TODO mood today ...
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd

I did it with a trigger and it seems to work like a charm. The function
that already updates the file for create and alter user has been made a
built-in "SQL" function and a trigger is created at initdb time.

Comments around the pg_pwd updating function seem to be worried about
this
routine being called concurrently, but I really don't see a reason to
worry about this. Verify for yourself. I guess we never had a system
trigger before, so treat this with care, and feel free to adjust the
nomenclature as well.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:57:36 +00:00
Bruce Momjian 1ff0a475ee Fix for psql from Peter. 1999-12-11 21:35:49 +00:00
Bruce Momjian 298845a6f0 Allow ; in () in psql. 1999-12-11 01:03:36 +00:00
Bruce Momjian e639a1a6a8 This takes care of TODO item
* pg_dump should preserve primary key information

Also a couple of warnings removed.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-11 00:31:05 +00:00
Bruce Momjian 3c75d64f40 Remove old file. 1999-12-10 17:46:41 +00:00
Bruce Momjian 77a4729936 This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.
Also, minor tweakage of tab completion, and I hope the output is flushed
on time now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-10 03:59:30 +00:00
Jan Wieck a27542c3a8 Added a fflush(stdout) to the \p command required for the
multisession test tool.

Jan
1999-12-10 00:26:35 +00:00
Bruce Momjian 469cf43fac Remove extra vacuum, from Peter. 1999-12-09 04:36:57 +00:00
Bruce Momjian 0dec669a0f Change $< to $+ in scripts Makefile, and clean up pg_encoding if logic. 1999-12-08 10:29:55 +00:00
Bruce Momjian a010be7543 Peter's file removals. 1999-12-07 22:43:03 +00:00
Bruce Momjian a0aab48fcd Okay, that should put us back in sync. These two patches (src & doc) are
against the sources from one hour ago and contain all the portable and
up
to date stuff.

A few other CVS "householding" things you might want to take care of:

* Remove the src/bin/cleardbdir directory

* Remove the file src/bin/psql/sql_help.h from the repository, as it is
a derived file and is build by the release_prep.

Peter Eisentraut
1999-12-07 22:41:44 +00:00
Tatsuo Ishii 8ad4f99b73 Fix the case of -o given 1999-12-06 08:49:00 +00:00
Tatsuo Ishii 8231a7ab20 Fix minor bugs 1999-12-06 08:35:34 +00:00
Tatsuo Ishii 5b912b089c pg_ctl: a script to start/stop/restart and report status of postmaster. 1999-12-06 07:23:41 +00:00
Bruce Momjian 81c0383295 Fix echo -n and read -r in scripts. 1999-12-05 20:52:54 +00:00
Bruce Momjian 60ae5ed037 Remove destroylang.sgml. 1999-12-05 20:29:18 +00:00
Bruce Momjian 66f8da0756 Update 1999-12-05 20:04:42 +00:00
Bruce Momjian ed62104ea9 I cleaned those out as well (the echo -n "bug" was in there ;) and moved
them into the scripts dir. I also added a --list option to show already
installed languages.

This whole moving and renaming totally confused CVS and my checked out
copy got completely fried last night. When you apply the source patch,
please make sure that all the directories src/bin/{create|destroy}* as
well as vacuumdb, cleardbdir are gone and that all the scripts (7) are
in
scripts/.

Meanwhile I am still puzzled about what happened with the docs patch.
Because I don't know what you got now, the second attachment contains
the
files

ref/allfiles.sgml
ref/commands.sgml
ref/createlang.sgml
ref/droplang.sgml
doc/src/sgml/Makefile

Peter Eisentraut                  Sernanders väg 10:115
1999-12-05 20:02:49 +00:00
Bruce Momjian 240e4c98f5 New scripts for create/drop user/db from Peter Eisentraut 1999-12-04 04:53:22 +00:00
Bruce Momjian 1f64926953 Fix compile error on older patch. 1999-11-30 04:29:57 +00:00
Bruce Momjian 47e51683e6 I pulled this one out via CVS, I hope you can make use of it:
Peter.
1999-11-29 05:28:11 +00:00
Tom Lane fb55fa0478 Remove obsolete note about pg_vlock lock file. 1999-11-28 02:17:43 +00:00
Tom Lane adbf98a77f Fix references to backend/port files so that they actually work. 1999-11-27 19:43:20 +00:00
Bruce Momjian a7f14616c6 Change // to /* */ 1999-11-26 17:26:38 +00:00
Bruce Momjian 09f185a040 Fix missing prototype psql warning. 1999-11-26 04:36:48 +00:00
Bruce Momjian 78bc83fedf * Includes tab completion. It's not magic, but it's very cool. At any
rate
  it's better than what used to be there.

* Does proper SQL "host variable" substitution as pointed out by Andreas
  Zeugwetter (thanks): select * from :foo; Also some changes in how ':'
  and ';' are treated (escape with \ to send to backend). This does
_not_
  affect the '::' cast operator, but perhaps others that contain : or ;
  (but there are none right now).

* To show description with a <something> listing, append '?' to command
  name, e.g., \df?. This seemed to be the convenient and logical
solution.
  Or append a '+' to see more useless information, e.g., \df+.

* Fixed fflush()'ing bug pointed out by Jan during the regression test
  discussion.

* Added LastOid variable. This ought to take care of TODO item "Add a
  function to return the last inserted oid, for use in psql scripts"
  (under CLIENTS)
  E.g.,
insert into foo values(...);
insert into bar values(..., :LastOid);
\echo $LastOid

* \d command shows constraints, rules, and triggers defined on the table
  (in addition to indices)

* Various fixes, optimizations, corrections

* Documentation update as well


Note: This now requires snprintf(), which, if necessary, is taken from
src/backend/port. This is certainly a little weird, but it should
suffice
until a source tree cleanup is done.

Enjoy.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-11-26 04:24: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
Tom Lane d8ba3dfb0b Change backend-side COPY to write files with permissions 644 not 666
(whoever thought world-writable files were a good default????).  Modify
the pg_pwd code so that pg_pwd is created with 600 permissions.  Modify
initdb so that permissions on a pre-existing PGDATA directory are not
blindly accepted: if the dir is already there, it does chmod go-rwx
to be sure that the permissions are OK and the dir actually is owned
by postgres.
1999-11-21 04:16:17 +00:00
Bruce Momjian 58d1eeaafe Fix for arm32 and fix for dbname with dash. 1999-11-18 21:47:41 +00:00
Bruce Momjian e61e4d460c Fix for psql control-d and .psqlrc that I broke. Fix for \dT with
descriptions enabled.
1999-11-13 19:16:47 +00:00
Bruce Momjian db12a63ef1 The \p\g fix didn't turn out to be so bad. It even works in other
circumstances:
=> select * from foo\x\t\pset border 0 \p\g\\select * from bar;

Also the release prep update so the sql_help.h is generated before
packaging.

Peter.
1999-11-13 02:04:54 +00:00
Bruce Momjian 2a24ec6f16 In the spirit of TODO item
* Add use of 'const' for varibles in source tree
(which is misspelled, btw.)
I went through the front-end libpq code and did so. This affects in
particular the various accessor functions (such as PQdb() and
PQgetvalue()) as well as, by necessity, the internal helpers they use.

I have been really thorough in that regard, perhaps some people will find
it annoying that things like
char * foo = PQgetvalue(res, 0, 0)
will generate a warning. On the other hand it _should_ generate one. This
is no real compatibility break, although a few clients will have to be
fixed to suppress warnings. (Which again would be in the spirit of the
above TODO.)

In addition I replaced some int's by size_t's and removed some warnings
(and generated some new ones -- grmpf!). Also I rewrote PQoidStatus (so it
actually honors the const!) and supplied a new function PQoidValue that
returns a proper Oid type. This is only front-end stuff, none of the
communicaton stuff was touched.


The psql patch also adds some new consts to honor the new libpq situation,
as well as fixes a fatal condition that resulted when using the -V
(--version) option and there is no database listening.


So, to summarize, the psql you should definitely put in (with or without
the libpq). If you think I went too far with the const-mania in libpq, let
me know and I'll make adjustments. If you approve it, I will also update
the docs.

        -Peter

--
Peter Eisentraut                  Sernanders vaeg 10:115
1999-11-11 00:10:14 +00:00
Bruce Momjian c6c60302ba Cleanup of psql \copyright 1999-11-10 01:22:37 +00:00
Bruce Momjian b2c55a02b1 psql makefile fix from Keith Parks 1999-11-08 15:59:59 +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 17d819c093 Fix for recusive exit call from Massimo. 1999-11-06 17:01:29 +00:00
Bruce Momjian a9ade930da Sort help file names, from Peter Eisentraut 1999-11-06 16:49:06 +00:00
Bruce Momjian 5e3189eaff Update psql banner 1999-11-05 18:21:09 +00:00
Bruce Momjian f793ac0a16 Update psql display. 1999-11-05 15:44:57 +00:00
Bruce Momjian 3d1db6ddc6 Update \? display. 1999-11-05 02:12:59 +00:00
Bruce Momjian 200e183254 Make pager on by default. 1999-11-05 01:38:58 +00:00
Bruce Momjian f0a45ccd0a Clean up \? psql display. 1999-11-05 01:25:39 +00:00
Bruce Momjian 754a4428a6 psql banner cleanup 1999-11-05 00:12:52 +00:00
Bruce Momjian 87a8c72a64 clean up startup banner 1999-11-05 00:10:03 +00:00
Bruce Momjian e6a0e4ed61 Fix EOF/control-D display in psql. 1999-11-04 23:26:02 +00:00
Bruce Momjian dc16399d8d Update to psql, run pgindent. 1999-11-04 23:17:33 +00:00
Bruce Momjian 0e6652e673 psql cleanup 1999-11-04 23:14:30 +00:00
Bruce Momjian 2323b63631 Update psql with man pages and new version of help. 1999-11-04 22:07:57 +00:00
Bruce Momjian a45195a191 Major psql overhaul by Peter Eisentraut. 1999-11-04 21:56:02 +00:00
Bruce Momjian 9dab728700 Update to pgaccess 0.98. 1999-10-31 19:50:48 +00:00
Bruce Momjian b531c55a9b Update for 0.98. 1999-10-31 12:23:41 +00:00
Bruce Momjian b19013cfb7 Update pgaccess makefile for 0.98 1999-10-31 11:50:03 +00:00
Bruce Momjian 01523ce14a Update pgaccess for 0.98. 1999-10-30 21:21:50 +00:00
Bruce Momjian 2a5f3869a2 Add pgaccess Makefile. 1999-10-30 16:39:48 +00:00
Bruce Momjian e0852543e2 Add 0.98. 1999-10-30 16:18:54 +00:00
Bruce Momjian dbdb80baca Remove 0.96 for update to 0.98 1999-10-30 16:01:19 +00:00
Bruce Momjian 60f3e6b3a5 Make USING in COPY optional. 1999-10-29 23:52:22 +00:00
Bruce Momjian d79d0a3c0f Fix psql quote missing. 1999-10-27 16:33:45 +00:00
Bruce Momjian 021146f375 improve manual page 1999-10-26 04:40:58 +00:00
Bruce Momjian b6d6cffa99 Add documentation for comment. 1999-10-26 03:48:58 +00:00
Tom Lane 51f62d505e Standardize on MAXPGPATH as the size of a file pathname buffer,
eliminating some wildly inconsistent coding in various parts of the
system.  I set MAXPGPATH = 1024 in config.h.in.  If anyone is really
convinced that there ought to be a configure-time test to set the
value, go right ahead ... but I think it's a waste of time.
1999-10-25 03:08:03 +00:00
Tom Lane 2dd82a67e5 Remove gratuitous redefinitions of BLCKSZ. 1999-10-23 03:28:58 +00:00
Tom Lane ecd0bfa81a Look Ma, no MAX_PARSE_BUFFER! (At least not in the backend.
pg_dump and interfaces/odbc still need some work.)
1999-10-23 03:13:33 +00:00
Bruce Momjian 627b5e9c20 Backup psql banner change. 1999-10-23 01:31:32 +00:00
Bruce Momjian 918d9de886 change issue to information in banner 1999-10-21 01:24:53 +00:00
Bruce Momjian 4931dea619 Make psql startup banner cleaner. 1999-10-21 00:43:46 +00:00
Bruce Momjian 2d12ee3f71 Update psql \? for \w. 1999-10-14 01:28:42 +00:00
Bruce Momjian 65a2c8f5b8 Improve pg_dump template1 error reports. 1999-10-10 17:00:26 +00:00
Bruce Momjian 944dec1ff0 Improve pg_dump template1 error message. 1999-10-10 14:42:44 +00:00
Vadim B. Mikheev 4793740367 XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
First step in cleaning up backend initialization code.
Fix for FATAL: now FATAL is ERROR + exit.
1999-10-06 21:58:18 +00:00
Tom Lane 6eb8d255d2 Allow CREATE FUNCTION's WITH clause to be used for all language types,
not just C, so that ISCACHABLE attribute can be specified for user-defined
functions.  Get rid of ParamString node type, which wasn't actually being
generated by gram.y anymore, even though define.c thought that was what
it was getting.  Clean up minor bug in dfmgr.c (premature heap_close).
1999-10-02 21:33:33 +00:00
Bruce Momjian 692b83730b Fix pg_upgrade so it vacuums all databases. 1999-09-28 18:04:18 +00:00
Bruce Momjian 1e821d05f2 pg_upgrade reminder. 1999-09-28 16:02:28 +00:00
Bruce Momjian 9394d62c73 I have been working with user defined types and user defined c
functions.  One problem that I have encountered with the function
manager is that it does not allow the user to define type conversion
functions that convert between user types. For instance if mytype1,
mytype2, and mytype3 are three Postgresql user types, and if I wish to
define Postgresql conversion functions like

I run into problems, because the Postgresql dynamic loader would look
for a single link symbol, mytype3, for both pieces of object code.  If
I just change the name of one of the Postgresql functions (to make the
symbols distinct), the automatic type conversion that Postgresql uses,
for example, when matching operators to arguments no longer finds the
type conversion function.

The solution that I propose, and have implemented in the attatched
patch extends the CREATE FUNCTION syntax as follows. In the first case
above I use the link symbol mytype2_to_mytype3 for the link object
that implements the first conversion function, and define the
Postgresql operator with the following syntax

The patch includes changes to the parser to include the altered
syntax, changes to the ProcedureStmt node in nodes/parsenodes.h,
changes to commands/define.c to handle the extra information in the AS
clause, and changes to utils/fmgr/dfmgr.c that alter the way that the
dynamic loader figures out what link symbol to use.  I store the
string for the link symbol in the prosrc text attribute of the pg_proc
table which is currently unused in rows that reference dynamically
loaded
functions.


Bernie Frankpitt
1999-09-28 04:34:56 +00:00
Bruce Momjian d62a7ac6d3 Massimo's SET FSYNC and SHOW PG_OPTIONS changes, without SET QUERY_LIMIT. 1999-09-27 20:27:32 +00:00
Bruce Momjian 74a263ed34 Fix to give super user and createdb user proper update catalog rights. 1999-09-27 16:44:56 +00:00
Bruce Momjian f66393514f One last missing quoting bug in pg_dump:
now that sequence names are properly quoted for field defaults, mixed
case sequence names are generated. These are properly quoted in the
CREATE SEQUENCE lines, but not in the SELECT nextval lines, as per
below:

CREATE SEQUENCE "Teams_TeamID_seq" start 10 increment 1 maxvalue
2147483647 minvalue 1  cache 1 ;
SELECT nextval ('Teams_TeamID_seq');

This needs to be:
SELECT nextval ('"Teams_TeamID_seq"');

Patch included below.
--
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu>
1999-09-23 19:11:09 +00:00
Bruce Momjian 337ab803a2 TRUNCATE command from Mike Mascari<mascarim@yahoo.com> 1999-09-23 17:11:16 +00:00
Bruce Momjian e7cad7b0cb Add TRUNCATE command, with psql help and sgml additions. 1999-09-23 17:03:39 +00:00
Marc G. Fournier 196cbe4e1d last batch, I think... 1999-09-20 22:33:47 +00:00
Marc G. Fournier 3848b4648a fixing it more.. 1999-09-20 22:32:50 +00:00
Marc G. Fournier a00a1a5641 bring it all into -current again 1999-09-20 22:30:47 +00:00
Marc G. Fournier 25acbc510b try and fix things... 1999-09-20 22:29:12 +00:00
Marc G. Fournier 7737dfd35a bring in missing files ... this isn't very clean, but :( 1999-09-20 22:28:11 +00:00
Tom Lane f1de4f9532 Additional long-query fixes from Mike Ansley and yours truly.
psql.c seems clean of query length restrictions now.
1999-09-06 23:30:53 +00:00
Bruce Momjian 4478d299e1 Document -x properly for pg_dump. 1999-09-01 23:05:20 +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
Tom Lane b0984e6995 Add a VACUUM command in hopes of making pg_upgrade usable again
in MVCC environment.  I do not trust this until Vadim says it's OK...
1999-08-02 22:34:53 +00:00
Tom Lane 970ef45c41 Re-enable pg_upgrade, after adding checks that the source
and target databases are of versions it knows about.
1999-07-31 22:06:44 +00:00
Bruce Momjian 44763a2b23 Make usecatupd disabled for normal users, and allow normal users to
update temp tables with this setting.
1999-07-30 18:09:49 +00:00
Bruce Momjian f96babac12 While I was running some tests in psql, trying to figure out how to change
the query string to handle any length, I discovered that under certain
conditions, psql will core dump when handling long strings.  Thus, the
patch.  It was caused by a buffer overrun, probably not noticeable in a lot
of cases, but pretty noticeable in mine.

Problem was caused by the fact that the length check is only performed after
the check for a ; to get the end of the query and execute.

Cheers...

MikeA
1999-07-20 17:20:43 +00:00
Bruce Momjian d6ce220f04 psql fix. 1999-07-19 21:06:19 +00:00
Bruce Momjian 50644a2202 Cleanup of patch just applied. 1999-07-19 16:49:17 +00:00
Bruce Momjian 2b8c9e793d Set the application name, used for parsing readline's .inputrc -- dz
Massimo
1999-07-19 16:46:53 +00:00
Bruce Momjian e44c931801 Re-add getopt.h check, remove NT-specific tests for it. 1999-07-19 02:27:16 +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 7d5b08dec0 More cleanup 1999-07-16 05:41:19 +00:00
Bruce Momjian 4b2c2850bf Clean up #include in /include directory. Add scripts for checking includes. 1999-07-15 15:21:54 +00:00
Tatsuo Ishii 8f02f2252d Fix some compiler warnings (Tomoaki Nishiyama), add WIN1250 support (Pavel Behal) 1999-07-11 22:47:21 +00:00
Bruce Momjian cda192317a createlang now returns 2 for language already exists. 1999-07-09 17:57:46 +00:00
Bruce Momjian 5babe7db45 Remove old readme file. 1999-07-05 21:48:21 +00:00
Bruce Momjian 4c65382596 Remove QUERY_LIMIT and documenation on same. Change _ALIGN to TYPEALIGN
for Irix.
1999-06-17 15:16:09 +00:00
Bruce Momjian 61882d4c37 Cleanup 1999-06-08 01:37:55 +00:00
Bruce Momjian f56483490b Disable pg_upgrade for 6.5. 1999-06-08 01:32:05 +00:00
Bruce Momjian 505b2ecdf4 I attach a patch for pg_upgrade. This does two things:
1. check whether the program is being executed in $PGDATA/..  This is
   necessary if the data tree is not in the standard place, as is the
   case with the Debian distribution (because of Debian policy).

2. give a clearer error message if the dumped data structure fails to
   be loaded.

Oliver Elphick
1999-06-07 22:58:31 +00:00
Bruce Momjian 8864ee0b6b > Here is a small patch that should only affect win32 building
> (native win32, not cygnus).
> It does the following:
> Patches two win32.mak files to DEFINE HAVE_VSNPRINTF and
> HAVE_STRDUP. This is required to build at all.
> Bumps the version number on libpq.dll from 6.4 to 6.5.
> Required for install programs to work.
> Adds defintions for BLCKSZ and MAXIMUM_ALIGN to "win32.h" in
> the client-side libpiq directory.
>
> All these files are only used when building on native win32,
> so it should be safe I think.
>
> Again, really sorry to throw this in so late, but I would
> hate to do the same thing as with 6.4 (which required 6.4.1
> to at all compile on Win32).
>
> Thanks,
>
>   //Magnus
1999-06-07 14:29:20 +00:00
Tatsuo Ishii 7e6a9a60ff a fix for Win32 support provided by yutaka@marin.or.jp.
The patch will avoid to add .exe suffix to the pg_encoding
	binary.
1999-06-05 10:27:31 +00:00
Tom Lane 857c079304 Suppress indexes on large objects from psql's \d listing;
they were confusing because the large object tables themselves are not
shown.  (Besides, if you've got hundreds or thousands of large objects,
you really don't want to see 'em at all.)
Also, suppress all indexes from the \z ACL listing, since indexes have
no meaningful protection information.
1999-06-04 21:21:13 +00:00
Tom Lane 1c3c080534 Turns out OIDNAMELEN wasn't really being used at all!
Get rid of it to make customization of NAMEDATALEN easier.
1999-06-04 21:12:07 +00:00
Bruce Momjian f0f416a2d3 Add mention of SHARE ROW EXCLUSIVE mode. 1999-06-04 04:28:54 +00:00
Bruce Momjian 155b5808ca Thanks for this, but SET TRANSACTION ISOLATION LEVEL
should be described like SET TIME ZONE: TO is not allowed, as well
as DEFAULT option. There are only two forms:

for Vadim.
1999-06-03 20:42:18 +00:00
Bruce Momjian a4a5f56202 Add mention of FOR UPDATE and LIMIT/OFFSET> 1999-06-03 19:52:09 +00:00
Bruce Momjian e1ea7cc2e5 Update lock sgml/man/psql help pages. 1999-06-03 19:18:00 +00:00
Bruce Momjian 4a077caa60 Add SET TRANSACTION ISOLATION LEVEL and SET NAMES mention. 1999-06-03 18:38:00 +00:00
Bruce Momjian 7857241229 Update psql help so it looks better. 1999-06-03 18:25:27 +00:00
Bruce Momjian fa0ed6f047 Update SET commands for psql \h, man pages, and sgml. 1999-06-03 18:18:43 +00:00
Tom Lane 58d8584eea pg_dump failed on any database containing large objects,
because it ignored the LOs themselves but failed to ignore the indexes
on the LOs.  How long has this been broken??
1999-06-03 04:01:16 +00:00
Tom Lane ca08ce28e8 Clean up uninitialized-variable warning from egcs.
(Curious that gcc doesn't complain about this code...).
1999-05-30 15:32:45 +00:00
Vadim B. Mikheev df9e539ea2 1. Run all pg_dump queries in single serializable transaction.
2. Get rid of locking when updating statistics in vacuum.
3. Use QuerySnapshot in COPY TO and call SetQuerySnashot
   in main tcop loop before FETCH and COPY TO.
1999-05-29 10:25:33 +00:00
Bruce Momjian 615e77ede2 Make pg_dump dump ACL's by default, print warning on use of -z, and add
new -x option to skip acl dump.
1999-05-27 16:29:05 +00:00
Tom Lane 8eb18d874e Fix pg_dump to use the same maximum-query-size constant as
the backend does.  Remove unnecessary limitation on field size in
dumpClasses_dumpData (ie, -d or -D case).
1999-05-26 21:51:13 +00:00
Bruce Momjian bf09f8aa43 Display numeric precision on \d. 1999-05-26 20:08:06 +00:00
Bruce Momjian e7528612d8 Allow GROUPs to be dumped properly. 1999-05-26 19:45:53 +00:00
Bruce Momjian 9b35ec2615 Disable use of -o and -d pg_dump options together. Can't set oids in
inserts.  Change some variables to bool to be clearer.
1999-05-26 16:06:45 +00:00
Bruce Momjian eeadc5e87f Allow pg_dump -v display proper table/sequence count display. 1999-05-26 14:50:38 +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
Jan Wieck 3de11d6526 Removed the automatic installation of built procedural languages
from initdb again.

Added two new commands, createlang and destroylang to bin. These
hopefully end this damned mklang.sql discussion.

Jan
1999-05-20 16:50:08 +00:00
Bruce Momjian de81fbd047 I've got 2 pretty small patches.
configtype.patch simply fixes a typo in config.h.in
pg_dump.c.patch Updates a bunch of error messages to include a reason
from
                the backend, and also removes a couple of unnecessary
if's

Ole Gjerde
1999-05-15 22:18:51 +00:00
Bruce Momjian 519ad246ae Here's a small patch to cause pg_dump to emit the
scale and precision for NUMERIC type column defs.

Keith Parks
1999-05-13 02:35:44 +00:00
Tom Lane eb4d9f45ef Do not refer to stdin in static variable initializer ...
apparently some systems choke on that :-(.
1999-05-12 23:26:03 +00:00
Jan Wieck ca00c902fb Added installation of created procedural languages to initdb
Jan
1999-05-12 10:35:44 +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
Thomas G. Lockhart 54067db642 Allow -t tablename to preserve case if specified as "tablename". 1999-05-04 15:47:35 +00:00
Bruce Momjian 210055ad61 here are some patches for 6.5.0 which I already submitted but have never
been applied. The patches are in the .tar.gz attachment at the end:

varchar-array.patch     this patch adds support for arrays of bpchar() and
                        varchar(), which where always missing from postgres.

                        These datatypes can be used to replace the _char4,
                        _char8, etc., which were dropped some time ago.

block-size.patch        this patch fixes many errors in the parser and other
                        program which happen with very large query statements
                        (> 8K) when using a page size larger than 8192.

                        This patch is needed if you want to submit queries
                        larger than 8K. Postgres supports tuples up to 32K
                        but you can't insert them because you can't submit
                        queries larger than 8K. My patch fixes this problem.

                        The patch also replaces all the occurrences of `8192'
                        and `1<<13' in the sources with the proper constants
                        defined in include files. You should now never find
                        8192 hardwired in C code, just to make code clearer.


--
Massimo Dal Zotto
1999-05-03 19:10:48 +00:00
Tom Lane 22fe451c9d psql's recognition of comments didn't work right in MULTIBYTE
environments; it was being careless about character lengths.
1999-04-25 23:10:36 +00:00
Tom Lane 38405e1894 Update CREATE FUNCTION's on-line help in psql. 1999-04-18 03:01:49 +00:00
Tom Lane 1ae6739ee1 psql did the wrong thing with COPY FROM STDIN inside a file
sourced with \i (tried to read data from the terminal, rather than from
the source file; this breaks pg_dump scripts read with \i).  Also, \o file
followed by COPY TO STDOUT wrote to terminal not designated file.
All better now.
1999-04-15 02:24:41 +00:00
Tom Lane eaffc61675 Correct psql's online help for CREATE OPERATOR, which did
not match what the backend actually accepts.
1999-04-14 23:48:07 +00:00
Tom Lane faba9fa747 pg_dump was trying to use an incorrect (or, perhaps, only obsolete?)
syntax for CREATE OPERATOR with SORT parameters.  Fixed.
It is now actually possible to dump and reload a database containing
fully specified user-definable operators ...
1999-04-14 23:47:19 +00:00
Tatsuo Ishii 3f8f0ac1a7 Bug fixes and enhances to psql submitted by Masaaki Sakaida
1. Fix problems of PAGER and \? command
2. Add -E option that shows actual queries sent by \dt and friends
3. Add version number in startup banners for psql
1999-03-30 05:00:42 +00:00
Tatsuo Ishii e1a22d5e84 Add KOI8/WIN/ALT to set client_encoding command help 1999-03-24 06:57:20 +00:00
Tatsuo Ishii 494b82b718 Fix typo. #ifdef MUTIBYTE --> #ifdef MULTIBYTE 1999-03-24 06:55:14 +00:00
Bruce Momjian 0d01fd4e19 Add EXCEPT/INTERSECT doc changes. 1999-03-19 02:41:41 +00:00
Bruce Momjian 58118db39d Add new postgres -O option to allow system table structure changes. 1999-03-17 22:53:31 +00:00
Bruce Momjian 265c283e1b > > > This patches src/bin/psql/psql.c.
> > >
> > > This patch is in responce to the following TODO list item:
> > >  * have psql \d on a view show the query
> > > -Ryan
1999-03-15 02:18:37 +00:00
Bruce Momjian e94fffc1c1 This patch improves the destroyuser script's behaviour in checking whether
the user is allowed to detroy users.  It also allows for a possible incorrect
empty reply to a yes/no question.


Oliver Elphick
1999-03-14 16:00:55 +00:00
Marc G. Fournier 1c264e68c5 From: Constantin Teodorescu <teo@flex.ro>
UPgrade to 0.96 ..
1999-03-09 14:17:51 +00:00
Marc G. Fournier 8c3e8a8a0e From: Tatsuo Ishii <t-ishii@sra.co.jp>
Ok. I made patches replacing all of "#if FALSE" or "#if 0" to "#ifdef
NOT_USED" for current. I have tested these patches in that the
postgres binaries are identical.
1999-02-21 03:49:55 +00:00
Bruce Momjian 6724a50787 Change my-function-name-- to my_function_name, and optimizer renames. 1999-02-13 23:22:53 +00:00
Tom Lane 07c33ba79e pg_dump -d or -D didn't quote special characters in INSERT data
correctly.  -D had problems with tables with inherited fields, also.
1999-02-08 01:46:28 +00:00
Bruce Momjian 65decc3402 Allow psql to do \p\g. Ingres does it, why not us? 1999-02-07 02:56:53 +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 a7ad43cd18 Included patches make some enhancements to the multi-byte support.
o allow to use Big5 (a Chinese encoding used in Taiwan) as a client
  encoding. In this case the server side encoding should be EUC_TW

o add EUC_TW and Big5 test cases to the regression and the mb test
  (contributed by Jonah Kuo)

o fix mistake in include/mb/pg_wchar.h. An encoding id for EUC_TW was
  not correct (was 3 and now is 4)

o update documents (doc/README.mb and README.mb.jp)

o update psql helpfile (bin/psql/psqlHelp.h)

--
Tatsuo Ishii
t-ishii@sra.co.jp
1999-02-02 18:51:40 +00:00
Bruce Momjian 8358a8f6a0 psql help fix. 1999-02-02 18:41:17 +00:00
Bruce Momjian 1b907ab8f5 Fix for psql help create table. 1999-02-02 18:39:23 +00:00
Bruce Momjian 4390b0bfbe Add TEMP tables/indexes. Add COPY pfree(). Other cleanups. 1999-02-02 03:45:56 +00:00
Marc G. Fournier f7c4ec5085 From: D'Arcy J.M. Cain <darcy@druid.net>
The following patch does two things.

 - Clarifies what the effect of allowing users to add new users (Thet
   become super-users.)
 - Makes the default database for the new user if they are not allowed
   to and the user agrees to create it.
1999-01-31 05:04:25 +00:00
Jan Wieck 3e2f87f3f3 Changed qualification of pg_views and pg_tables to directly
check if a rewrite rule on SELECT exists/not exists instead
of asking pg_get_viewdef() function.

Jan
1999-01-28 15:28:40 +00:00
Marc G. Fournier 2ae5d51668 From: Tatsuo Ishii <t-ishii@sra.co.jp>
Included patches fix a portability problem of unsetenv() used in
6.4.2 multi-byte support. unsetenv() is only avaliable on FreeBSD and
Linux so I decided to replace with putenv().
1999-01-27 01:18:23 +00:00
Bruce Momjian 289a826dab Here is a new version of my patch for allowing pg_dump to DROP schema
elements prior to CREATEing new ones.  It is under control of the -c
command line option (with the default being status quo).

The DROP TRIGGER portion still needs implementation.  Anyone able to
help clarify what exactly the CREATE TRIGGER portion does so I can fix
this?

Again, I have tried this with tables/indexes/sequences, but do not
have other schema elements in my database.  As a result, I am not 100%
convinced that I got the syntax correct in all cases (but think I did,
nonetheless).  If anyone can check the other cases, I'd appreciate it.

Cheers,
Brook

[I added manual page and sgml additions for the new -c option.]
1999-01-21 22:53:37 +00:00
Bruce Momjian fd7b963316 Fix for typo in gram.y 1999-01-18 06:32:27 +00:00
Bruce Momjian 7a6b562fdf Apply Win32 patch from Horak Daniel. 1999-01-17 06:20:06 +00:00
Bruce Momjian 99603f8578 Add pgaccess Makefile. 1998-12-18 17:54:42 +00:00
Bruce Momjian 3d39ea7341 Here are descriptions:
- the first patch is just to preven listing the perl warning in the
  make output unless it is actually emitted by the make.  this may
  prevent new users from being confused by the warning in their output

- the second patch (to 2 files) just enables building/installing
  pgaccess if TCL and TK are available.  a Makefile is created to do
  this, but you may wish to change the heading information in it since
  I just copied another Makefile to use as a template.

I hope these make it into 6.4.1.

Cheers,
Brook
1998-12-18 17:53:22 +00:00
Bruce Momjian ffb90a01fd Current multi-byte related codes have a bug with SQL_ASCII
support. Included patches will solve it and should be applied to
both trees.  Also, it fix the problem with \c command of psql when
switching different encoding databases.

Regression tests passed.
--
Tatsuo Ishii
t-ishii@sra.co.jp
1998-12-14 04:59:58 +00:00
Thomas G. Lockhart e18d900da4 Adjust handling of data type names to suppress double quotes
unless necessary.
Label internal bpchar types as "character" and varchar types as
 "character varying" to be less Postgres-specific. These types map to
 the SQL92 definitions anyway.
Redefine g_force_quotes to be the local variable force_quotes.
Pass this as an argument to fmtId().
These should help with handling the single-byte internal "char" type.
1998-12-13 23:41:32 +00:00
Bruce Momjian 5c431eb1f2 Included patches should fix following problems in the muti-byte
enabled PostgreSQL 6.4.

o binary cursor does not work
o pg_dumpall produces incorrect create database statemnt

Tatsuo Ishii
t-ishii@sra.co.jp
1998-12-12 22:04:09 +00:00
Bruce Momjian 4c87f79854 Update to pgaccess 0.93. 1998-12-12 21:15:40 +00:00
Tom Lane 84107b419e Fix coredumping bug in pg_dump -z; also eliminate memory leaks
in the ACL code, and spell "GRANT RULE" correctly.
Apply patch from Oliver Elphick to not dump inherited constraints.
Apply patch from Constantin Teodorescu to dump table definitions with a
readable layout.
1998-12-05 22:09:57 +00:00
Tom Lane 19740e2fff Portability fixes found needed for SunOS 4.1.x:
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...
1998-11-30 00:30:05 +00:00
Thomas G. Lockhart 8d507c204b Additional fixes for mixed-case table names from Billy Allie. 1998-11-17 14:26:39 +00:00
Tom Lane 0856cdf3f7 Fix a couple of bugs involving calling fmtID() twice in
a single printf() ... it'd work if fmtId() didn't use a static return area...
1998-11-15 07:09:13 +00:00
Thomas G. Lockhart 9f07f8f40f Add "vacuumdb" utility to make it easier to clean databases.
Also supports the "analyze" mode, with or without specifying tables
 and columns.
1998-11-14 01:58:15 +00:00
Thomas G. Lockhart 69ff5b9c7e Add "vacuumdb" utility. 1998-11-14 01:56:36 +00:00
Thomas G. Lockhart 680e4a2950 Add "-N" flag to force double quotes around identifiers.
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".
1998-11-06 15:54:47 +00:00
Marc G. Fournier a00c668139 Upgrade to 0.91 ... 1998-11-06 04:11:52 +00:00
Tom Lane 997966061e Fix missing dependency for Makefile inclusions.
Get rid of some stray tabs that might confuse Make.
1998-10-27 21:51:54 +00:00
Tom Lane 990fa43c23 Get rid of some minor compiler warnings. 1998-10-26 01:05:07 +00:00
Bruce Momjian d79f3884f4 cleanup 1998-10-25 02:48:55 +00:00
Bruce Momjian ba74ce73bb Fix from Tom Lane for pg_shadow in pg_upgrade 1998-10-25 02:47:38 +00:00
Tom Lane a7cdfdf022 Fix pg_upgrade to notice if psql fails to execute the given
script, and not proceed with the update if so.
Also add #!/bin/sh header line.
1998-10-24 20:09:46 +00:00
Bruce Momjian f49cf6d094 The TCL/TK configuration cleanup patches I submitted have the following
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
1998-10-18 04:16:08 +00:00
Bruce Momjian af8df21b7e Add missing tcl *.in files. 1998-10-16 17:00:44 +00:00
Bruce Momjian 01cdd04731 TCL/TK fixes from Billy G. Allie. 1998-10-15 15:58:16 +00:00
Bruce Momjian 8cec4cf91b New QUERY_LIMIT set command. 1998-10-14 05:10:12 +00:00
Bruce Momjian ecf145f492 Remove TCL_LIB,TCL_INCDIR,TK_LIB,TK_INCDIR. 1998-10-13 16:30:49 +00:00
Bruce Momjian 0f78649ccc Cleanup from Billy. 1998-10-12 04:45:22 +00:00
Bruce Momjian d2d919f7b7 tcl cleanup. 1998-10-12 04:32:24 +00:00
Bruce Momjian 4c64bb7d97 add new file. 1998-10-12 02:42:22 +00:00
Bruce Momjian 7a9312b422 Tcl fixes from Billy G. Allie 1998-10-12 02:41:01 +00:00
Bruce Momjian b0dfc47794 2) Can't dump/restore varchar fields (See attached bug report/patch)
Cary B. O'Brien
1998-10-12 02:05:42 +00:00
Bruce Momjian 2133276ecc Update to pgaccess 0.90. 1998-10-08 22:50:20 +00:00
Tom Lane 976625c54a I continue my quest to eliminate documentation that claims
a listen/notify condition name is a class or table name, 'cause it ain't.
1998-10-08 01:10:28 +00:00
Bruce Momjian 30debec6e5 Hello!
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
1998-10-08 00:10:49 +00:00
Bruce Momjian 803204bd1e Playing around with pg_dump for a while resulted in some
fixes,  enhancements and some found bugs not yet fixed. After
    all I was able to get useful results  when  dumping/reloading
    the regression database.

Jan
1998-10-06 22:14:21 +00:00
Thomas G. Lockhart b53d36618f Forgot to initialize double quote option to be enabled. 1998-10-06 05:35:42 +00:00
Bruce Momjian b7ed6f8512 Hi all
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
1998-10-06 03:09:02 +00:00
Bruce Momjian e1ebac319d Here are the patches against the current source tree. I have run the
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
1998-10-06 03:02:29 +00:00
Thomas G. Lockhart a54ba52101 Properly interpret environment variables passed as the input location. 1998-10-05 02:51:21 +00:00
Thomas G. Lockhart 9601964773 Surround all identifiers with double quotes.
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.
1998-10-02 16:43:41 +00:00
Bruce Momjian f93b6974f9 Here's a combination of all the patches I'm currently waiting
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
1998-10-02 16:28:04 +00:00
Tom Lane 0d1aa5ac52 pg_dump -z was careless about ownership of indexes.
Now it's a little less so.
1998-10-01 01:49:12 +00:00
Bruce Momjian b932b1b1c4 Allow 8-key indexes. 1998-09-23 04:22:14 +00:00
Bruce Momjian 25a64f7519 Fix for \z formatting from Tom Lane. 1998-09-21 02:25:29 +00:00
Bruce Momjian 3ac9688ae8 I also noticed that pg_dump contains a copy of the same
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
1998-09-20 03:18:43 +00:00
Bruce Momjian a29ae2264a Hi patchers/hackers.
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
1998-09-09 18:16:36 +00:00
Bruce Momjian 9d8d647146 patch cleanups. 1998-09-03 05:08:28 +00:00
Bruce Momjian 9fbaf1d851 Remove \r\n in windows makefile. 1998-09-03 02:16:27 +00:00
Bruce Momjian 811106676e Oops. I'll fix this.
Here are patches for bin/createdb/createdb.sh.
--
Tatsuo Ishii
t-ishii@sra.co.jp
1998-09-03 02:12:14 +00:00
Bruce Momjian f71d0cf64e Attached is a patch to remove the definitions of libpq's internal
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.
1998-09-03 02:10:56 +00:00
Thomas G. Lockhart b9cbb1ed39 Fix message delimiters for substitution by sed script during installation.
They were missing a "PG_" prefix so were not substituted properly.
1998-09-01 15:57:00 +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 2913d6557e Preserver pg_log and pg_variable in upgrade. Cleanups. 1998-08-31 04:32:18 +00:00
Bruce Momjian 3b7d13a6b0 Make old db directory configurable. 1998-08-30 13:14:00 +00:00
Bruce Momjian c870be6590 New pg_upgrade command. 1998-08-30 05:06:54 +00:00
Bruce Momjian cd9b34ed67 Add missing pgaccess file. 1998-08-30 03:32:47 +00:00
Bruce Momjian 690235fcdd Update INSTALL, etc. for release 6.4. Update pgaccess to 0.88. 1998-08-30 01:40:52 +00:00
Bruce Momjian 88800aac14 Ok. BTW Mr. Kataoka who is maintaing Japanese version of PostgreSQL
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
1998-08-29 18:06:57 +00:00
Bruce Momjian a060d5bedf Hello!
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
1998-08-29 04:05:46 +00:00
Bruce Momjian a53ea467e1 Hi all,
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
1998-08-28 03:36:31 +00:00
Marc G. Fournier 602ac52d3e From: Magnus Hagander <mha@edu.sollentuna.se>
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.
1998-08-27 13:25:40 +00:00
Marc G. Fournier f62d1253ef From: Massimo Dal Zotto <dz@cs.unitn.it>
>       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.
1998-08-25 21:37:08 +00:00
Thomas G. Lockhart 6962f86e74 Clean up double-quotes around column and table names.
Had too many in some cases because there was already a routine
 taking care of it.
1998-08-25 15:02:04 +00:00
Bruce Momjian 15cb32d93e This is the final state of the rule system for 6.4 after the
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
1998-08-24 01:38:11 +00:00
Bruce Momjian c0b01461db o note that now pg_database has a new attribuite "encoding" even
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
1998-08-24 01:14:24 +00:00
Bruce Momjian 212f7bdfe3 Patch to allow createuser options from the command line. 1998-08-22 05:19:35 +00:00
Bruce Momjian 99a099d436 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.

			regards, tom lane
1998-08-22 04:49:05 +00:00
Bruce Momjian 9005da08de Fix display in initdb. 1998-08-21 23:22:36 +00:00
Bruce Momjian 4a70002149 fix for index problem. 1998-08-20 22:07:46 +00:00
Bruce Momjian 31309423c9 Another vacuum fix. 1998-08-20 15:16:59 +00:00
Bruce Momjian 09e125084a Fix for vacuum introduced today. 1998-08-19 23:48:23 +00:00
Bruce Momjian bd5aaca391 Vacuum fix. Was modifying cache. 1998-08-19 19:59:49 +00:00
Marc G. Fournier 9312033071 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>
1998-08-17 03:50:43 +00:00
Thomas G. Lockhart 58e9267026 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...
1998-08-14 16:05:51 +00:00
Bruce Momjian ffb120ecc6 Add new \w write command to psql. 1998-08-10 20:31:42 +00:00
Bruce Momjian af5fde7491 Make large objects their own relkind type. Fix dups in pg_class_mb
files.  Fix sequence creation hack for relkind type.
1998-08-06 05:13:14 +00:00