Commit Graph

3214 Commits

Author SHA1 Message Date
Peter Eisentraut 6faf8024fa Enable large file support.
Use off_t and size_t in pg_dump to handle file offset arithmetic correctly.
2002-08-20 17:54:45 +00:00
Bruce Momjian ebe1be1321 This patch improves the behavior of FOUND in PL/PgSQL. In Oracle,
FOUND is set whenever a SELECT INTO returns > 0 rows, *or* when an
INSERT, UPDATE, or DELETE affects > 0 rows. We implemented the first
part of this behavior, but not the second.

I also improved the documentation on the various situations in which
FOUND can be set (excluding inside FOR loops, which I still need to
think about), and added some regression tests for this behavior.

Neil Conway
2002-08-20 05:28:24 +00:00
Bruce Momjian 818a33e4d5 Cleanup. 2002-08-20 05:12:48 +00:00
Bruce Momjian 5243f9a998 Allow pg_statistics to be reset by calling pg_stat_reset().
Christopher Kings-Lynne
2002-08-20 04:47:52 +00:00
Bruce Momjian de9801fc62 Add current_database().
> Quick system function to pull out the current database.
>
> I've used this a number of times to allow stored procedures to find out
> where they are.  Especially useful for those that do logging or hit a
> remote server.
>
> It's called current_database() to match with current_user().

It's also a necessity for an informational schema.  The catalog
(database) name is required in a number of places.

Rod Taylor
2002-08-20 04:46:00 +00:00
Bruce Momjian c43760a714 Add mention of -F not supported by pg_dumpall. Code already disallows it. 2002-08-20 02:20:48 +00:00
Bruce Momjian 4ee4940584 Done by Rod:
> * -Make other constraints clearer in dump file
2002-08-20 02:16:38 +00:00
Tom Lane a0bf1a7f2e Fix pg_dump to dump serial columns as serials. Per pghackers discussion,
cause SERIAL column declaration not to imply UNIQUE, so that this can be
done without creating an extra index.
2002-08-19 19:33:36 +00:00
Tatsuo Ishii d35dc342f1 Fix broken tag. 2002-08-19 04:05:00 +00:00
Peter Eisentraut c828ec8820 Make pg_dump output more portable and more pleasing to look at.
The -n and -N options were removed.  Quoting is now smart enough to
supply quotes if and only if necessary.

Numerical types are now printed without quotes, except in cases of
special values such as NaN.

Boolean values printed as true and false.

Most string literals now do not escape whitespace characters (newlines,
etc.) for portability.

SET SESSION AUTHORIZATION argument is a string literal, to follow SQL.

Made commands output by pg_dump use consistent spacing and indentation.
2002-08-18 09:36:26 +00:00
Bruce Momjian 2c6b34d959 Add db-local user names, per discussion on hackers. 2002-08-18 03:03:26 +00:00
Tom Lane e16591038a Fix typo. 2002-08-17 20:24:51 +00:00
Bruce Momjian 7c02c86d0f Add:
> * Use dependency information to dump data in proper order
2002-08-17 15:09:41 +00:00
Bruce Momjian a8d27511c7 Done:
> 	o -Add command to display locks
2002-08-17 13:14:07 +00:00
Bruce Momjian 82119a696e [ Newest version of patch applied.]
This patch is an updated version of the lock listing patch. I've made
the following changes:

    - write documentation
    - wrap the SRF in a view called 'pg_locks': all user-level
      access should be done through this view
    - re-diff against latest CVS

One thing I chose not to do is adapt the SRF to use the anonymous
composite type code from Joe Conway. I'll probably do that eventually,
but I'm not really convinced it's a significantly cleaner way to
bootstrap SRF builtins than the method this patch uses (of course, it
has other uses...)

Neil Conway
2002-08-17 13:04:19 +00:00
Bruce Momjian f0ed4311b6 Add libpq connection timeout parameter.
Denis A Ustimenko
2002-08-17 12:33:18 +00:00
Bruce Momjian b813554dbd Improve documentation of trigger firing queue handling, cleanup.
Neil Conway
2002-08-17 12:15:49 +00:00
Tom Lane 2132ac89bf Editorial corrections. 2002-08-17 05:07:18 +00:00
Tom Lane 8bca70fad5 Broken markup. 2002-08-17 04:09:18 +00:00
Tom Lane d383b734f8 Add missing links. 2002-08-17 03:38:43 +00:00
Bruce Momjian 08f245bfd4 Add doc file for pg_resetxlog. 2002-08-17 02:45:29 +00:00
Bruce Momjian 6945ea3445 Move pg_controldata to /bin. 2002-08-17 02:43:08 +00:00
Tom Lane a208ea72bc Modify pg_dump to dump foreign-key constraints as constraints, not as
sets of triggers.  Also modify psql \d command to show foreign key
constraints as such and hide the triggers.  pg_get_constraintdef()
function added to backend to support these.  From Rod Taylor, code
review and some editorialization by Tom Lane.
2002-08-16 23:01:21 +00:00
Bruce Momjian 141539c31e Improve wording. 2002-08-16 20:36:25 +00:00
Bruce Momjian cd1f4087c9 Move pg_controldata from /contrib to src/bin. 2002-08-16 20:34:06 +00:00
Bruce Momjian ab0f98518c Add "few":
> * Reserve last few process slots for super-user if max_connections reached
2002-08-16 17:05:18 +00:00
Bruce Momjian fa9d7c1c13 Add blank line. 2002-08-16 15:13:13 +00:00
Bruce Momjian 8c8a56ee2d Add:
<
> * Reserve last process slot for super-user if max_connections reached
2002-08-16 15:12:43 +00:00
Bruce Momjian 8352113169 This patch improves the "Client Authentication" section of the user's
guide in a few minor ways.

Neil Conway
2002-08-16 04:48:16 +00:00
Bruce Momjian b4794bfb54 This patch improves the "Database Users and Permissions" section of
the Administrator's Guide. This section needs a lot more work, but
this is a start anyway...

Neil Conway
2002-08-16 04:47:43 +00:00
Bruce Momjian 83a0d895ca Added:
<
> * Prevent mismatch of frontend/backend encodings from converting bytea
>   data from being interpreted as encoded strings
512a514,515
> * Fix glibc's mktime() to handle pre-1970's dates
>
2002-08-16 04:45:44 +00:00
Bruce Momjian 2f7e3a2ffc Added:
> * Allow configuration files to be specified in a different directory
2002-08-16 04:31:52 +00:00
Bruce Momjian 52f8c56a41 Done:
> 	o -Prevent loss of indexes, permissions, inheritance
2002-08-15 17:47:24 +00:00
Bruce Momjian ea1954fc35 Done:
> * -Improve control over user privileges, including table creation
> * -Add PGPASSWORDFILE environment variable or ~/.pgpass to store
> 	o -Compile under jdk 1.4
2002-08-15 17:46:46 +00:00
Bruce Momjian b1a5f87209 Tom Lane wrote:
> There's no longer a separate call to heap_storage_create in that routine
> --- the right place to make the test is now in the storage_create
> boolean parameter being passed to heap_create.  A simple change, but
> it passeth patch's understanding ...

Thanks.

Attached is a patch against cvs tip as of 8:30 PM PST or so. Turned out
that even after fixing the failed hunks, there was a new spot in
bufmgr.c which needed to be fixed (related to temp relations;
RelationUpdateNumberOfBlocks). But thankfully the regression test code
caught it :-)

Joe Conway
2002-08-15 16:36:08 +00:00
Bruce Momjian 38294db64b Reorder entry to be alphabetical to match others. 2002-08-15 14:26:15 +00:00
Bruce Momjian 1276356268 PostgreSQL 7.2.1 Documentation
Chapter 1. libpq - C Library
1.3. Command Execution Functions
1.3.3. Escaping binary strings for inclusion in SQL queries

I found the line
"The result string length does not include the terminating zero byte of the result."
is not right.
The result string length does indeed include the terminating zero byte.

Christoph Haller
2002-08-15 03:00:59 +00:00
Bruce Momjian 88bd306832 > Neil Conway <nconway@klamath.dyndns.org> writes:
> > This patch improves the documentation of the UPDATE and ALTER TABLE
> > commands to elaborate on the effect of specifying an "ONLY" clause.
>
> Unfortunately this is still only half the truth ... see the
> SQL_INHERITANCE configuration variable.

Okay, I've attached an updated patch with more information on
SQL_INHERITANCE and inheritance behavior in prior releases.

Neil Conway
2002-08-15 02:59:18 +00:00
Bruce Momjian 7f4981f4af I'm giving a try at some TODO items. Currently it's the turn of the
PGPASSWORDFILE environment variable.  I have modified libpq to make use
of this variable.  I present the first cut here.

Currently the format for the file should be

host:port:database:user:password

Alvaro Herrera
2002-08-15 02:56:19 +00:00
Bruce Momjian 64a0649432 Update text:
< 	o Allow PL/PgSQL function parameters to be passed by name,
> 	o Allow function parameters to be passed by name,
2002-08-14 18:39:05 +00:00
Bruce Momjian 5b74309053 Update:
> 	o Cluster all tables at once using pg_index.indisclustered set during
>           previous CLUSTER
2002-08-14 17:45:20 +00:00
Bruce Momjian dec918479f I guess I'd vote for changing the code to be
sys = malloc(strlen(editorName) + strlen(fname) + 10 + 1);
        if (!sys)
                return false;
        sprintf(sys, "exec '%s' '%s'", editorName, fname);

(note the added quotes to provide a little protection against spaces
and such).  Then it's perfectly obvious what the calculation is doing.
I don't care about wasting 20-some bytes, but confusing readers of the
code is worth avoiding.

                        regards, tom lane
2002-08-14 05:49:22 +00:00
Bruce Momjian fcbc87c1ee Add:
> 	o Add ALTER TABLE tab SET WITHOUT OIDS
2002-08-14 04:58:17 +00:00
Bruce Momjian 561e25ad71 Oops, not done:
> * Have views on temporary tables exist in the temporary namespace
2002-08-14 03:41:09 +00:00
Bruce Momjian 596ba5ecc4 Updated:
< * Allow temporary views
< * Require view using temporary tables to be temporary views
> * -Have views on temporary tables exist in the temporary namespace
2002-08-14 03:40:41 +00:00
Bruce Momjian 293ab5abf3 Fix spacing. 2002-08-14 02:51:13 +00:00
Bruce Momjian 9f19f3c836 Added:
<
> 	o Improve PL/PgSQL exception handling
> 	o Allow PL/PgSQL parameters to be specified by name and type during
> 	  definition
> 	o Allow PL/PgSQL function parameters to be passed by name,
> 	  get_employee_salary(emp_id => 12345, tax_year => 2001)
> 	o Add PL/PgSQL packages
> 	o Allow array declarations and other data types in PL/PgSQl DECLARE
> 	o Add PL/PgSQL PROCEDURES that can return multiple values
2002-08-14 02:49:42 +00:00
Tatsuo Ishii 969e0246ed Add Cyrillic and other encodings for encoding conversion.
Patches submitted by Kaori Inaba (i-kaori@sra.co.jp).
2002-08-14 02:45:10 +00:00
Bruce Momjian d3bd1a00bc Remove namedatalen from TODO.detail. No longer needed. 2002-08-14 02:28:30 +00:00
Bruce Momjian e9a0de8b3f Done:
> * -Increase identifier length (NAMEDATALEN) if small performance hit,
> * -Increase maximum number of function parameters if little wasted space
2002-08-14 02:24:47 +00:00