Commit Graph

4007 Commits

Author SHA1 Message Date
Bruce Momjian 6d9ee7e7ca Add:
> * Add config variable to prevent auto-adding missing FROM-clause tables
2003-06-01 04:31:33 +00:00
Bruce Momjian e70a8ee97d Add:
> * Prevent whole-row references from leaking memory, e.g. SELECT COUNT(tab.*)
2003-05-31 02:54:57 +00:00
Bruce Momjian 944b162305 Add:
> * Consider using MVCC to cache count(*) queries with no WHERE clause
2003-05-31 02:31:50 +00:00
Bruce Momjian 2f1d96c3e0 Add item about sending success stories to http://advocacy.postgresql.org. 2003-05-31 02:25:11 +00:00
Tom Lane 9e1e72b698 Cause pg_dumpall to support the -a, -s, -x options of pg_dump. 2003-05-30 23:55:10 +00:00
Tom Lane 9fbd52808e Adopt latest bison's spelling of 'syntax error' rather than 'parse error'
for grammar-detected problems.  Revert Makefile hack that kept it looking
like the pre-bison-1.875 output.
2003-05-29 20:40:36 +00:00
Tom Lane fc8d970cbc Replace functional-index facility with expressional indexes. Any column
of an index can now be a computed expression instead of a simple variable.
Restrictions on expressions are the same as for predicates (only immutable
functions, no sub-selects).  This fixes problems recently introduced with
inlining SQL functions, because the inlining transformation is applied to
both expression trees so the planner can still match them up.  Along the
way, improve efficiency of handling index predicates (both predicates and
index expressions are now cached by the relcache) and fix 7.3 oversight
that didn't record dependencies of predicate expressions.
2003-05-28 16:04:02 +00:00
Bruce Momjian e5f19598e0 Add to thread discussion. 2003-05-28 05:02:38 +00:00
Bruce Momjian a2b498c291 Add info about selecting a random row. 2003-05-28 04:35:28 +00:00
Bruce Momjian 98b6f37e47 Make debug_ GUC varables output DEBUG1 rather than LOG, and mention in
docs that CLIENT/LOG_MIN_MESSAGES now controls debug_* output location.
Doc changes included.
2003-05-27 17:49:47 +00:00
Bruce Momjian 90903069e9 Add item for changing a column's data type. 2003-05-26 19:25:20 +00:00
Tom Lane 6923ea2b86 Fix misstatement in release-notes item. 2003-05-26 18:58:26 +00:00
Bruce Momjian 4b864e7cb0 Update:
< * Add now("transaction|statement|clock") functionality
> * Add transaction_timestamp(), statement_timestamp(), clock_timestamp() functionality
2003-05-26 18:36:51 +00:00
Bruce Momjian b71a48990a Add documentation to 'createuser' that ALTER USER must be used to add or
modify passwords, per user confusion report.

Also clean up wording that command line utils need database access.
2003-05-26 17:50:09 +00:00
Bruce Momjian ab64881f97 Add:
> * Allow UPDATE to use SET col = DEFAULT
2003-05-26 02:56:40 +00:00
Tom Lane f45df8c014 Cause CHAR(n) to TEXT or VARCHAR conversion to automatically strip trailing
blanks, in hopes of reducing the surprise factor for newbies.  Remove
redundant operators for VARCHAR (it depends wholly on TEXT operations now).
Clean up resolution of ambiguous operators/functions to avoid surprising
choices for domains: domains are treated as equivalent to their base types
and binary-coercibility is no longer considered a preference item when
choosing among multiple operators/functions.  IsBinaryCoercible now correctly
reflects the notion that you need *only* relabel the type to get from type
A to type B: that is, a domain is binary-coercible to its base type, but
not vice versa.  Various marginal cleanup, including merging the essentially
duplicate resolution code in parse_func.c and parse_oper.c.  Improve opr_sanity
regression test to understand about binary compatibility (using pg_cast),
and fix a couple of small errors in the catalogs revealed thereby.
Restructure "special operator" handling to fetch operators via index opclasses
rather than hardwiring assumptions about names (cleans up the pattern_ops
stuff a little).
2003-05-26 00:11:29 +00:00
Peter Eisentraut 297c1658ed Information schema improvements 2003-05-25 09:36:09 +00:00
Bruce Momjian 8facf2df0b Move item:
< * Update clients to use data types, typmod, schema.table.column names of
<   result sets using new query protocol
453a452,453
> 	o Update clients to use data types, typmod, schema.table.column names of
> 	  result sets using new query protocol
2003-05-25 04:44:41 +00:00
Bruce Momjian 66f6bbb4eb Update:
< * Allow clients to get data types, typmod, schema.table.column names from
<   result sets, either via the backend protocol or a new QUERYINFO command

to:

> * Update clients to use data types, typmod, schema.table.column names of
>   result sets using new query protocol
2003-05-25 03:20:13 +00:00
Bruce Momjian ca98317f4b Add:
> * Allow clients to get data types, typmod, schema.table.column names from
>   result sets, either via the backend protocol or a new QUERYINFO command
2003-05-24 19:03:21 +00:00
Bruce Momjian 12094d0946 Update XML items:
> * Allow backend to output result sets in XML
> * Add XML capability to pg_dump and COPY, when backend XML capability
2003-05-24 18:25:35 +00:00
Bruce Momjian 27f729c8fa Added:
> * Find a way to reduce rotational delay when repeatedly writing
>   last WAL page
2003-05-24 15:33:46 +00:00
Bruce Momjian 76e386d5e4 Add cost estimate discussion to TODO.detail. 2003-05-24 03:59:06 +00:00
Bruce Momjian 07d89f6f81 Add to TODO:
* With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY

Add to trigger TODO.detail.
2003-05-24 01:28:22 +00:00
Bruce Momjian c49b6f4510 With disabled triggers, allow pg_dump to use ALTER TABLE ADD FOREIGN KEY 2003-05-24 01:27:41 +00:00
Michael Meskes 78d2156066 One more ecpg todo fixed and removed. 2003-05-23 17:20:46 +00:00
Bruce Momjian 27330595d3 Place statement_timeout in proper order in docs, from Bruno Wolff III. 2003-05-23 16:34:36 +00:00
Tom Lane d23f6f8bb7 Update release history for impending 7.3.3 release. 2003-05-22 18:31:45 +00:00
Michael Meskes baba07173c Removed one TODO item for ecpg as this is done. 2003-05-22 08:15:42 +00:00
Tom Lane edcf9c237c Add error message style guidelines to the SGML documentation. 2003-05-19 21:38:24 +00:00
Peter Eisentraut f89c972ac8 Add documentation for information schema, and some corrections on some
views.
2003-05-18 20:55:57 +00:00
Bruce Momjian 12c9423832 Allow Win32 to compile under MinGW. Major changes are:
Win32 port is now called 'win32' rather than 'win'
        add -lwsock32 on Win32
        make gethostname() be only used when kerberos4 is enabled
        use /port/getopt.c
        new /port/opendir.c routines
        disable GUC unix_socket_group on Win32
        convert some keywords.c symbols to KEYWORD_P to prevent conflict
        create new FCNTL_NONBLOCK macro to turn off socket blocking
        create new /include/port.h file that has /port prototypes, move
          out of c.h
        new /include/port/win32_include dir to hold missing include files
        work around ERROR being defined in Win32 includes
2003-05-15 16:35:30 +00:00
Peter Eisentraut 2c0556068f Indexing support for pattern matching operations via separate operator
class when lc_collate is not C.
2003-05-15 15:50:21 +00:00
Tom Lane f85f43dfb5 Backend support for autocommit removed, per recent discussions. The
only remnant of this failed experiment is that the server will take
SET AUTOCOMMIT TO ON.  Still TODO: provide some client-side autocommit
logic in libpq.
2003-05-14 03:26:03 +00:00
Tom Lane ba1e066e46 Implement array_send/array_recv (binary I/O for arrays). This exposed
the folly of not passing element type to typsend/typreceive, so fix that.
2003-05-09 23:01:45 +00:00
Tom Lane b1ee615a7f COPY BINARY uses the new binary I/O routines. Update a few more datatypes
so that COPY BINARY regression test passes.
2003-05-09 21:19:50 +00:00
Tom Lane 45d04099df Reinstate pg_type's typsend and typreceive columns. They don't do much
yet, but they're there.  Also some editorial work on CREATE TYPE reference
page.
2003-05-08 22:19:58 +00:00
Tom Lane 4e08d35e7d Fix documentation problem pointed out by Barry Lind: code expected a
terminating zero byte in StartupMessage, docs didn't mention it.
2003-05-08 14:35:24 +00:00
Tom Lane 1718f4c66c Update COPY BINARY file format spec to reflect recent decisions about
external representation of binary data.
2003-05-07 22:23:27 +00:00
Tom Lane 2de6da832f Revise protocol doc for recently-agreed modifications. This is the
first version of the 3.0 protocol that can be considered non-draft.
2003-05-07 21:46:15 +00:00
Tom Lane 6165a278e5 Fix erroneous example, per Tim Knowles. 2003-05-07 03:41:31 +00:00
Tom Lane efa58e105d Minor editorializing. 2003-05-06 23:10:04 +00:00
Tom Lane 755d191700 Add display of eventual result RowDescription (if any) to the output
of Describe on a prepared statement.  This was in the original 3.0
protocol proposal, but I took it out for reasons that seemed good at
the time.  Put it back per yesterday's pghackers discussion.
2003-05-06 21:51:42 +00:00
Tom Lane ea7896bf58 Provide a real link to CREATE SEQUENCE's reference page in nextval/setval
discussion.
2003-05-05 15:08:49 +00:00
Tom Lane 16503e6fa4 Extended query protocol: parse, bind, execute, describe FE/BE messages.
Only lightly tested as yet, since libpq doesn't know anything about 'em.
2003-05-05 00:44:56 +00:00
Peter Eisentraut d1b4327d02 Last round of reference page editing. 2003-05-04 02:23:16 +00:00
Tom Lane ac5fdea687 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our
implementation limits, do not issue an ERROR; instead issue a NOTICE and use
the max supported value.  Per pgsql-general discussion of 28-Apr, this is
needed to allow easy porting from pre-7.3 releases where the limits were
higher.

Unrelated change in same area: accept GLOBAL TEMP/TEMPORARY as a synonym
for TEMPORARY, as per pgsql-hackers discussion of 15-Apr.  We previously
rejected it, but that was based on a misreading of the spec --- SQL92's
GLOBAL temp tables are really closer to what we have than their LOCAL ones.
2003-05-04 00:03:55 +00:00
Tom Lane de28dc9a04 Portal and memory management infrastructure for extended query protocol.
Both plannable queries and utility commands are now always executed
within Portals, which have been revamped so that they can handle the
load (they used to be good only for single SELECT queries).  Restructure
code to push command-completion-tag selection logic out of postgres.c,
so that it won't have to be duplicated between simple and extended queries.
initdb forced due to addition of a field to Query nodes.
2003-05-02 20:54:36 +00:00
Tom Lane cffded96ea Documentation refers to box() function where it should say box_intersect().
Thanks to Wes Sheldah for finding this one.
2003-05-01 00:57:05 +00:00
Tom Lane 4a5f38c4e6 Code review for holdable-cursors patch. Fix error recovery, memory
context sloppiness, some other things.  Includes Neil's mopup patch
of 22-Apr.
2003-04-29 03:21:30 +00:00
Bruce Momjian 6a17d226b5 Update German FAQ, from Ian Barwick 2003-04-28 22:40:38 +00:00
Tom Lane eea36f661c Minor wordsmithing on .pgpass description. 2003-04-28 19:30:49 +00:00
Tom Lane 05e7dd3156 Minor improvement in wording. 2003-04-28 05:17:31 +00:00
Tom Lane 092133beb3 Okay, I've had it with PQsetdbLogin having slightly different defaults
than PQconnectdb.  Reimplement the former to use the same code as the
latter.  Fix documentation omissions while at it.
2003-04-28 04:29:12 +00:00
Tom Lane 4089d25175 Fix plpgsql so that variables of composite types (rowtypes) can be
declared without having to write %ROWTYPE.  If the declared type of
a variable is a composite type, it'll be taken to be a row variable
automatically.
2003-04-27 22:21:22 +00:00
Peter Eisentraut 20aae3047f Editing of more reference pages. 2003-04-26 23:56:51 +00:00
Tom Lane 4db9689d1a Add transaction status field to ReadyForQuery messages, and make room
for tableID/columnID in RowDescription.  (The latter isn't really
implemented yet though --- the backend always sends zeroes, and libpq
just throws away the data.)
2003-04-26 20:23:00 +00:00
Tom Lane 9cbaf72177 In the continuing saga of FE/BE protocol revisions, add reporting of
initial values and runtime changes in selected parameters.  This gets
rid of the need for an initial 'select pg_client_encoding()' query in
libpq, bringing us back to one message transmitted in each direction
for a standard connection startup.  To allow server version to be sent
using the same GUC mechanism that handles other parameters, invent the
concept of a never-settable GUC parameter: you can 'show server_version'
but it's not settable by any GUC input source.  Create 'lc_collate' and
'lc_ctype' never-settable parameters so that people can find out these
settings without need for pg_controldata.  (These side ideas were all
discussed some time ago in pgsql-hackers, but not yet implemented.)
2003-04-25 19:45:10 +00:00
Tom Lane f690920a75 Infrastructure for upgraded error reporting mechanism. elog.c is
rewritten and the protocol is changed, but most elog calls are still
elog calls.  Also, we need to contemplate mechanisms for controlling
all this functionality --- eg, how much stuff should appear in the
postmaster log?  And what API should libpq expose for it?
2003-04-24 21:16:45 +00:00
Bruce Momjian b6660fddb5 Update CVS with new FAQ. 2003-04-22 18:03:00 +00:00
Peter Eisentraut 3450fd08a9 More editing of reference pages. 2003-04-22 10:08:08 +00:00
Tom Lane 5ed27e35f3 Another round of protocol changes. Backend-to-frontend messages now all
have length words.  COPY OUT reimplemented per new protocol: it doesn't
need \. anymore, thank goodness.  COPY BINARY to/from frontend works,
at least as far as the backend is concerned --- libpq's PQgetline API
is not up to snuff, and will have to be replaced with something that is
null-safe.  libpq uses message length words for performance improvement
(no cycles wasted rescanning long messages), but not yet for error
recovery.
2003-04-22 00:08:07 +00:00
Bruce Momjian 185ad7a839 Add mention of Novell Netware 6 port. 2003-04-21 14:54:15 +00:00
Bruce Momjian 7773434999 Make it clear it is the server version that determines if crlf is used. Idea from Joe Conway. 2003-04-20 01:52:55 +00:00
Bruce Momjian 9c48cae3e4 Add pipe parameter to COPY function to allow proper line termination. 2003-04-19 19:55:37 +00:00
Tom Lane bd8d441775 Second round of FE/BE protocol changes. Frontend->backend messages now
have length counts, and COPY IN data is packetized into messages.
2003-04-19 00:02:30 +00:00
Tom Lane cb7fb3ca95 First phase of FE/BE protocol modifications: new StartupPacket layout
with variable-width fields.  No more truncation of long user names.
Also, libpq can now send its environment-variable-driven SET commands
as part of the startup packet, saving round trips to server.
2003-04-17 22:26:02 +00:00
Bruce Momjian 76fd678c06 Make pg_dump's concurency capability more prominent. 2003-04-17 15:34:37 +00:00
Tom Lane 26b237ffad Various clarifications; add a clear DRAFT marker; minor adjustments in
some message types.  In particular add text/binary flag to StartCopyIn
and StartCopyOut, so that client library can know what is expected or
forthcoming.
2003-04-16 20:53:38 +00:00
Bruce Momjian e8ee547829 Add mention of OpenProjects IRC channel. It is as large as EFNet now. 2003-04-16 18:56:24 +00:00
Tom Lane fe19e56c57 First draft of revised FE/BE protocol specification. Still needs work,
but I'm putting it up so people can see and comment on it.
2003-04-15 22:51:18 +00:00
Bruce Momjian dde302dd4b Update Japanese FAQ, from Jun Kuwamura. 2003-04-15 21:00:27 +00:00
Peter Eisentraut 35e60ea967 Change names of ISO-8859-x encodings to ISO_8859_x, to match reality. 2003-04-15 13:26:54 +00:00
Peter Eisentraut 7c084d148f Bring SQL ref pages to consistent format, part 1. 2003-04-15 13:25:08 +00:00
Peter Eisentraut 72aa9488d3 Add better markup and improve some text here and there. 2003-04-15 13:23:35 +00:00
Tom Lane 3f4f235f79 Another try at correctly explaining the difference between Postgres and
SQL92 temp tables.  Possibly I got it right this time.
2003-04-14 18:08:58 +00:00
Tom Lane 4af1769ae9 Minor copy-editing. 2003-04-14 15:40:02 +00:00
Tom Lane 6d99dbb0c9 Clarify description of our deviation from standard for temp tables,
per suggestion from Mike Sykes.
2003-04-14 15:24:46 +00:00
Peter Eisentraut 6ff82c6742 Integrate the operator class section into the comprehensive extending SQL
chapter as well.
2003-04-13 09:57:35 +00:00
Peter Eisentraut 4e5602e9b8 A couple of minor fixes 2003-04-13 09:56:00 +00:00
Peter Eisentraut d8521b9b91 Revision 2003-04-11 18:41:20 +00:00
Peter Eisentraut dcb0049523 Revision 2003-04-11 13:22:35 +00:00
Peter Eisentraut a6554df4f7 In an effort to reduce the total number of chapters, combine the small
chapters on extending types, operators, and aggregates into the extending
functions chapter.  Move the information on how to call table functions
into the queries chapter.  Remove some outdated information that is
already present in a better form in other parts of the documentation.
2003-04-10 01:22:45 +00:00
Peter Eisentraut a8cb3368db General editing 2003-04-07 01:29:26 +00:00
Peter Eisentraut d7c333eb9a Fix markup. 2003-04-06 22:41:52 +00:00
Tom Lane 8cd571b202 Clarify exactly when DST-changeover-induced regression test failures
can be expected to occur.
2003-04-06 17:47:24 +00:00
Tom Lane 3b4ca4c0d9 Code review for pg_stat_get_backend_activity_start patch --- fix
return type, make protection condition agree with recent change to
pg_stat_get_backend_activity, clean up documentation.
2003-04-04 03:03:54 +00:00
Tom Lane a385186ff7 Remove zero_damaged_pages from postgresql.conf.sample; the only way to
find out about it is to read the documentation that tells you how
dangerous it is.  Add default_transaction_read_only to documentation;
seems to have been overlooked in patch that added read-only transactions.
Clean up check_guc comparison script, which has been suffering bit rot.
2003-04-03 23:32:47 +00:00
Bruce Momjian d79f743d51 Done in previous release:
< * Add --port flag to regression tests
2003-04-02 22:44:50 +00:00
Bruce Momjian 52bc8cadd4 Update Russian FAQ, from Viktor Vislobokov 2003-04-01 03:10:44 +00:00
Tom Lane 80597fd992 Fix broken markup. 2003-03-30 21:48:37 +00:00
Tom Lane fd42262836 Add code to apply some simple sanity checks to the header fields of a
page when it's read in, per pghackers discussion around 17-Feb.  Add a
GUC variable zero_damaged_pages that causes the response to be a WARNING
followed by zeroing the page, rather than the normal ERROR; this is per
Hiroshi's suggestion that there needs to be a way to get at the data
in the rest of the table.
2003-03-28 20:17:13 +00:00
Bruce Momjian c2d5abae9b Fix number of columns in SGML, from Weiping He 2003-03-28 00:23:29 +00:00
Bruce Momjian 54f7338fa1 This patch implements holdable cursors, following the proposal
(materialization into a tuple store) discussed on pgsql-hackers earlier.
I've updated the documentation and the regression tests.

Notes on the implementation:

- I needed to change the tuple store API slightly -- it assumes that it
won't be used to hold data across transaction boundaries, so the temp
files that it uses for on-disk storage are automatically reclaimed at
end-of-transaction. I added a flag to tuplestore_begin_heap() to control
this behavior. Is changing the tuple store API in this fashion OK?

- in order to store executor results in a tuple store, I added a new
CommandDest. This works well for the most part, with one exception: the
current DestFunction API doesn't provide enough information to allow the
Executor to store results into an arbitrary tuple store (where the
particular tuple store to use is chosen by the call site of
ExecutorRun). To workaround this, I've temporarily hacked up a solution
that works, but is not ideal: since the receiveTuple DestFunction is
passed the portal name, we can use that to lookup the Portal data
structure for the cursor and then use that to get at the tuple store the
Portal is using. This unnecessarily ties the Portal code with the
tupleReceiver code, but it works...

The proper fix for this is probably to change the DestFunction API --
Tom suggested passing the full QueryDesc to the receiveTuple function.
In that case, callers of ExecutorRun could "subclass" QueryDesc to add
any additional fields that their particular CommandDest needed to get
access to. This approach would work, but I'd like to think about it for
a little bit longer before deciding which route to go. In the mean time,
the code works fine, so I don't think a fix is urgent.

- (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and
adjusted the behavior of SCROLL in accordance with the discussion on
-hackers.

- (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml

Neil Conway
2003-03-27 16:51:29 +00:00
Bruce Momjian 7638087882 Remove email file. 2003-03-27 16:47:58 +00:00
Bruce Momjian fef89414e6 Done:
> 	o -Allow cursors outside transactions
2003-03-27 16:47:10 +00:00
Bruce Momjian 64c1399dac * Make pg_get_triggerdef documentation consistent with other pg_get_
functions
* Document pg_conversion_is_visible() which was created in one of my
previous patches and didn't get documented for some reason

Christopher Kings-Lynne
2003-03-27 16:45:51 +00:00
Bruce Momjian 7a3e7b64ac to_char fixes, Karel Zak 2003-03-27 16:35:31 +00:00
Peter Eisentraut 5e5c5cd31a Merge documentation into one book. (Build with "make html".) Replace
vague cross-references with real links.
2003-03-25 16:15:44 +00:00
Bruce Momjian 685a4934d2 I mean, bison 1.875. :-) 2003-03-25 15:11:53 +00:00
Bruce Momjian d49800de31 Mention bison 1.85 is now required. 2003-03-25 14:58:15 +00:00
Bruce Momjian f1792b932c Use PQfreemem() consistently, and document its use for Notify.
Keep PQfreeNotify() around for binary compatibility.
2003-03-25 02:44:36 +00:00
Bruce Momjian 8670e3588f Prevent multiple queries in a single string into a single transaction
when autocommit is off, and document grouping when autocommit is on.
2003-03-24 18:33:52 +00:00
Peter Eisentraut d258ba01ec Another big editing pass for consistent content and presentation. 2003-03-24 14:32:51 +00:00
Tom Lane 8d9e025e7f Instead of storing pg_statistic stavalues entries as text strings, store
them as arrays of the internal datatype.  This requires treating the
stavalues columns as 'anyarray' rather than 'text[]', which is not 100%
kosher but seems to work fine for the purposes we need for pg_statistic.
Perhaps in the future 'anyarray' will be allowed more generally.
2003-03-23 05:14:37 +00:00
Bruce Momjian 23ecb8855d Add PQfreemem() call for Win32. 2003-03-22 03:29:06 +00:00
Bruce Momjian e02f818311 Add hostmask() function:
+       <entry><function>hostmask</function>(<type>inet</type>)</entry>
+       <entry><type>inet</type></entry>
+       <entry>construct hostmask for network</entry>
+       <entry><literal>hostmask('192.168.23.20/30')</literal></entry>
+       <entry><literal>0.0.0.3</literal></entry>

Greg Wickham
2003-03-21 21:54:29 +00:00
Bruce Momjian 93331d8318 Remove mention of transactions for insensitive cursors. 2003-03-21 17:11:46 +00:00
Bruce Momjian c7d17a551a Done:
> * -Change NUMERIC data type to use base 10,000 internally
2003-03-21 03:47:38 +00:00
Tom Lane d72f6c7503 Reimplement NUMERIC datatype using base-10000 arithmetic; also improve
some of the algorithms for higher functions.  I see about a factor of ten
speedup on the 'numeric' regression test, but it's unlikely that that test
is representative of real-world applications.
initdb forced due to change of on-disk representation for NUMERIC.
2003-03-21 01:58:05 +00:00
Bruce Momjian b2e09fcd5e This is not the only place in the system catalogs where NULL is
effectively used to mean a default value that could also be spelled
out explicitly.  (ACLs behave that way, and useconfig/datconfig
do too IIRC.)

It's a bit of a hack, but it saves table space and backend code ---
without this convention the default would have to be inserted "manually"
since we have no mechanism to supply defaults when C code is forming a
new catalog tuple.

I'm inclined to leave the code alone.  But Alvaro is right that it'd be
good to point out the 'infinity' option in the CREATE USER and ALTER
USER man pages.  (Doc patch please?)

Alvaro Herrera
2003-03-20 20:05:32 +00:00
Bruce Momjian 0fe77d7283 The documentation for SELECT is incorrect in a sense: the syntax for a
join is defined as:

from_item [ NATURAL ] join_type from_item
    [ ON join_condition | USING ( join_column_list ) ]

However, if the join_type is an INNER or OUTER join, an ON, USING, or
NATURAL clause *must* be specified (it's not optional, as that segment
of the docs suggest).

I'm not exactly sure what the best way to fix this is, so I've attached
a patch adding a FIXME comment to the relevant section of the SGML. If
anyone has any ideas on the proper way to outline join syntax, please
speak up.

Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
2003-03-20 19:00:01 +00:00
Bruce Momjian 3be6367b9f This patch creates a function named pg_get_triggerdef that takes the oid of
a trigger as its parameter.  It is basically copied from the pg_dump
code.

Christopher Kings-Lynne
2003-03-20 18:58:02 +00:00
Bruce Momjian 8819213534 Now that the CLUSTER ALL machinery is in place, the clusterdb script can
be simplified (I'd thought that it can even be removed).  This patch
does that.

Alvaro Herrera
2003-03-20 18:53:18 +00:00
Bruce Momjian 432b9b0f75 Add ALTER TABLE <tablename> CLUSTER ON <indexname>
Alvaro Herrera
2003-03-20 18:52:48 +00:00
Bruce Momjian db5d7ccac9 It would also be handy if users could see their own pg_stat_activity
queries while the rest remain blank.

Kevin Brown
2003-03-20 18:51:16 +00:00
Bruce Momjian 41d17389f1 Fix typo in SGML tags. 2003-03-20 17:37:46 +00:00
Bruce Momjian da1534d952 Re-add type conversion examples. 2003-03-20 16:17:32 +00:00
Bruce Momjian 5f65225fa3 Todo items:
Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values

Also updated create sequence docs to mention NO MINVALUE, & NO MAXVALUE.

New Files:
doc/src/sgml/ref/alter_sequence.sgml
src/test/regress/expected/sequence.out
src/test/regress/sql/sequence.sql


ALTER SEQUENCE is NOT transactional.  It behaves similarly to setval().
It matches the proposed SQL200N spec, as well as Oracle in most ways --
Oracle lacks RESTART WITH for some strange reason.

--
Rod Taylor <rbt@rbt.ca>
2003-03-20 07:02:11 +00:00
Bruce Momjian 46bce088c1 Done:
> 	o -Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values
2003-03-20 07:00:57 +00:00
Bruce Momjian 44aba28020 PGRES_POLLING_ACTIVE is unused, keep for backward compatibility.
Lennert Buytenhek
2003-03-20 06:23:30 +00:00
Bruce Momjian 54ca7a7b13 (Now featuring documentation: fixed some typos, expanded the
Envrironment and Files section, explained exactly what -w
does)

This is a patch which allows pg_ctl to make an intelligent
guess as to the proper port when running 'psql -l' to
determine if the database has started up (the -w flag).

The environment variable PGPORT is used. If that is not found,
it checks if a specific port has been set inside the postgresql.conf
file. If it is has not, it uses the port that Postgres was
compiled with.

Greg Sabino Mullane  greg@turnstep.com
2003-03-20 05:00:14 +00:00
Bruce Momjian 15ce2d2e4a > I can see a couple possible downsides: (a) the library might have some
> weird behavior across fork boundaries; (b) the additional memory space
> that has to be duplicated into child processes will cost something per
> child launch, even if the child never uses it.  But these are only
> arguments that it might not *always* be a prudent thing to do, not that
> we shouldn't give the DBA the tool to do it if he wants.  So fire away.

Here is a patch for the above, including a documentation update. It
creates a new GUC variable "preload_libraries", that accepts a list in
the form:

   preload_libraries = '$libdir/mylib1:initfunc,$libdir/mylib2'

If ":initfunc" is omitted or not found, no initialization function is
executed, but the library is still preloaded. If "$libdir/mylib" isn't
found, the postmaster refuses to start.

In my testing with PL/R, it reduces the first call to a PL/R function
(after connecting) from almost 2 seconds, down to about 8 ms.

Joe Conway
2003-03-20 04:51:44 +00:00
Bruce Momjian 7d1d7200a0 Minor doc patch: create function
Gavin Sherry
2003-03-20 04:41:13 +00:00
Bruce Momjian 31ce4557b3 Item done:
> * -Add start time to pg_stat_activity
2003-03-20 03:40:33 +00:00
Bruce Momjian a18331004a Add start time to pg_stat_activity
Neil Conway
2003-03-20 03:34:57 +00:00
Bruce Momjian 1ef7ba20e7 Remove typecasting section that isn't needed anymore. 2003-03-19 21:20:52 +00:00
Bruce Momjian c085c771d3 Fix typo:
< * Rod is Rod Taylor <pg@rbt.ca)>
> * Rod is Rod Taylor <pg@rbt.ca>
2003-03-19 03:53:21 +00:00
Peter Eisentraut 9e0ab7126d Reimplement create and drop scripts in C, to reduce repetitive
connections, increase robustness, add NLS, and prepare for Windows port.
(vacuumdb and clusterdb will follow later.)
2003-03-18 22:19:47 +00:00
Bruce Momjian 526de7ffd1 Remove duplicate ANALYZE recommendation in pg_dump. 2003-03-18 17:05:01 +00:00
Bruce Momjian 6fdd71c133 Add to mmap discussion. 2003-03-18 01:36:01 +00:00
Bruce Momjian 29c18bca50 Add mention of ANALYZE after object restore. 2003-03-18 00:02:11 +00:00
Bruce Momjian ccfa6f1c1e Add mention of new sets returning functions capability. 2003-03-17 19:53:08 +00:00
Bruce Momjian 77312655a9 Update links, from Ian Barwick 2003-03-17 19:47:28 +00:00
Bruce Momjian b776fc198b Add:
> * Allow UPDATE tab SET ROW (col, ...) = (...) for updating multiple columns
2003-03-17 18:50:06 +00:00
Bruce Momjian aac4484345 Increase max known database size. 2003-03-17 16:33:12 +00:00
Bruce Momjian dc95c9f3ab Update name of GUC var:
< * Add GUC log_statement_duration to print statement and >= min duration
> * Add GUC log_statement_and_duration to print statement and >= min duration
2003-03-14 20:19:59 +00:00
Bruce Momjian 96fecb54dc Add:
> * Add GUC log_statement_duration to print statement and >= min duration
2003-03-14 19:27:49 +00:00
Peter Eisentraut 706a32cdf6 Big editing for consistent content and presentation. 2003-03-13 01:30:29 +00:00
Tom Lane 6261c75014 Implement SQL92-compatible FIRST, LAST, ABSOLUTE n, RELATIVE n options
for FETCH and MOVE.
2003-03-11 19:40:24 +00:00
Bruce Momjian 081fa240a1 Update German FAQ
Ian Barwick
2003-03-10 16:06:41 +00:00
Tom Lane aa83bc04e0 Restructure parsetree representation of DECLARE CURSOR: now it's a
utility statement (DeclareCursorStmt) with a SELECT query dangling from
it, rather than a SELECT query with a few unusual fields in it.  Add
code to determine whether a planned query can safely be run backwards.
If DECLARE CURSOR specifies SCROLL, ensure that the plan can be run
backwards by adding a Materialize plan node if it can't.  Without SCROLL,
you get an error if you try to fetch backwards from a cursor that can't
handle it.  (There is still some discussion about what the exact
behavior should be, but this is necessary infrastructure in any case.)
Along the way, make EXPLAIN DECLARE CURSOR work.
2003-03-10 03:53:52 +00:00
Bruce Momjian f93672e2c9 Not done:
> * Precompile SQL functions to avoid overhead (Neil)
2003-03-08 04:23:05 +00:00
Bruce Momjian b4bb288e5b Reorder items and mark some as completed.
> * Allow savepoints / nested transactions [transactions] (Bruce)
215d210
< 	o Add GUC parameter to control the maximum number of rewrite cycles
227,228c222
< 	o Allow parameters to be specified by name and type during
< 	  definition
> 	o Allow parameters to be specified by name and type during definition
304,305d297
< * Overhaul bufmgr/lockmgr/transaction manager
< * Allow savepoints / nested transactions [transactions] (Bruce)
386,387c378,379
< * Add checkpoint_min_warning postgresql.conf option to warn about checkpoints
<   that are too frequent
> * -Add checkpoint_min_warning postgresql.conf option to warn about checkpoints
>   that are too frequent (Bruce)
390d381
< * Allow pg_xlog to be moved without symlinks
406c397
< * Precompile SQL functions to avoid overhead (Neil)
> * -Precompile SQL functions to avoid overhead (Neil)
2003-03-08 03:03:49 +00:00
Bruce Momjian 2e6887df63 Add to mmap emails. 2003-03-07 17:43:26 +00:00
Bruce Momjian b7e089fdbb Update FAQ. 2003-03-07 05:49:10 +00:00
Bruce Momjian 650a854936 Update Russian FAQ, from Viktor Vislobokov. 2003-03-07 05:46:51 +00:00
Bruce Momjian 086c0712a7 Add:
> 	o Report server version number, database encoding, client encoding
2003-03-06 19:53:07 +00:00
Bruce Momjian 601a2c970c Add for protocol changes:
> 	o Report server version number
2003-03-06 19:52:20 +00:00
Bruce Momjian 4144c7b629 Remove:
< * Require DROP COLUMN CASCADE for a column that is part of a multi-column index
2003-03-06 18:39:18 +00:00