Commit Graph

14838 Commits

Author SHA1 Message Date
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 a6699f6185 Attached are two patches for psql's tab-completion.c.
The first cleans up a couple of minor errors and ommissions
and adds tab completion support to more slash commands, e.g.
\dv.

The second is an attempt to add tab completion for schemas
and fully qualified relation names (e.g. public.mytable ).
I think this covers the TODO-item:
"Allow psql to do table completion for SELECT * FROM schema_part and table
completion for SELECT * FROM schema_name."

This happens via union selects querying:
 - relation_name in current search path;
 - schema_name;
 - schema.relation_name
matching the current input string.

E.g:
  SELECT p[TAB]
will produce a list of all appropriate relation names in the current search
path which begin with 'p', and also all schema names which begin with 'p';
  \d pub[TAB]
will produce any relation names in the current search path and also
any schema names beginning with 'pub';
  \d public.[TAB]
will produce a list of all relations in the schema 'public';
  \d public.my[TAB]
produces all relation names beginning with 'my' in schema 'public'.

It seems to work for me; comments, suggestions, particularly regarding
the coding and queries, are very welcome.

Note that tables, indexes, views and sequences relations in the
'pg_catalog' namespace are excluded even though they are in
the current search path. I found not doing this produced annoying behaviour
when expanding names beginning with 'p'. People who work with system
tables a lot may not like this though; I can look for another solution
if necessary.

Ian Barwick
2003-03-27 16:45:01 +00:00
Bruce Momjian 9d6f5ee860 Adds
ALTER TABLE foo CLUSTER ON bar;

In pg_dumps, to preserve cluster settings.

Christopher Kings-Lynne
2003-03-27 16:43:07 +00:00
Bruce Momjian b099d9e7eb Reorder language creation to restore constistently.
Laurent FAILLIE
2003-03-27 16:39:17 +00:00
Bruce Momjian 7a3e7b64ac to_char fixes, Karel Zak 2003-03-27 16:35:31 +00:00
Tom Lane bf576cc014 GetTupleForTrigger must use outer transaction's command counter for time
qual checking, not GetCurrentCommandId.  Per test case from Steve Wolfe.
2003-03-27 14:33:11 +00:00
Michael Meskes 89508a8492 More changes to pgtypeslib and set optimization to -O1. 2003-03-27 14:29:17 +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
Tom Lane 2c19928301 plpgsql can assign to subscripted variables now, e.g.
x[42] := whatever;
The facility is pretty primitive because it doesn't do array slicing and
it has the same semantics as array update in SQL (array must already
be non-null, etc).  But it's a start.
2003-03-25 03:16:41 +00:00
Dave Cramer 9e29b32e78 patch to notify listeners on error from Csaba Nagy 2003-03-25 02:46:23 +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
Dave Cramer 6a19c6dccf added DISTINCT to the query to get cross reference. This is required when two columns in a table are both foreign keys to another table. From Peter Royal proyal@pace2020.com 2003-03-25 02:28:45 +00:00
Dave Cramer 326b2f96ae fixed problem where information from previous updates was leaking into subsequent updates patch from Shawn Green, slightly modified 2003-03-25 02:24:07 +00:00
Tom Lane 316c5cbfd3 Factor out duplicate code for computing values of PLpgSQL_datum items.
This is to help localize the changes needed for adding a new kind of
PLpgSQL_datum (like, say, an array element...)
2003-03-25 00:34:24 +00:00
Tom Lane 6ba159f9cf Ignore SIGXFSZ (if platform has it), so that ulimit violations work like
disk-full conditions instead of provoking a backend crash.  Per suggestion
from Frederic Surleau.
2003-03-24 22:40:14 +00:00
Tom Lane fddc2d94ce Modify keys_are_unique optimization to release buffer pins before it
returns NULL.  This avoids out-of-buffers failures during many-way
indexscans, as in Shraibman's complaint of 21-Mar.
2003-03-24 21:42:33 +00:00
Bruce Momjian 346182ca92 Add comment to postgresql.conf:
#search_path = '$user,public'   # schema names
2003-03-24 20:39:10 +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
Barry Lind e27334f405 New build number 2003-03-24 04:01:02 +00:00
Barry Lind 1e3372e6bb Fix bug in reading acls (didn't treat null acl as meaning the table owner had
full privs), also updated the regression test for this case.

 Modified Files:
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1DatabaseMetaData.java
 	jdbc/org/postgresql/test/jdbc2/DatabaseMetaDataTest.java
2003-03-24 03:48:32 +00:00
Tom Lane 0489783011 Adjust amrescan code so that it's allowed to call index_rescan with a
NULL key pointer, indicating that the existing scan key should be reused.
This behavior isn't used yet but will be needed for my planned fix to
the keys_are_unique code.
2003-03-23 23:01:03 +00:00
Bruce Momjian cb1672e9f8 Rename README in autovacuum code to match Makefile. 2003-03-23 20:16:06 +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
Tom Lane efeffae245 Tweak selectivity and related routines to cope with domains. Per report
from Andreas Pflug.
2003-03-23 01:49:02 +00:00
Bruce Momjian 8f5fb5f24e Remove ecpg #warning with approval from Michael. 2003-03-22 19:48:41 +00:00
Bruce Momjian 268bbf430f Add missing #include for calloc in ecpg. 2003-03-22 17:12:23 +00:00
Tom Lane 9323cb0aab Department of second thoughts: probably shouldn't use nth() to get the
appropriate targetlist entry out of the subquery.  Use an explicit search
like we do everywhere else.
2003-03-22 17:11:25 +00:00
Bruce Momjian ed11ccf4d4 Fix comment-only query to return Null result set, rather than nothing.
Cleans up blank query handling to be more consistent.
2003-03-22 04:23:34 +00:00
Bruce Momjian 23ecb8855d Add PQfreemem() call for Win32. 2003-03-22 03:29:06 +00:00
Bruce Momjian aaf11b931f Back out to_char fixes until regression tests are fixed. 2003-03-22 02:12:24 +00:00
Tom Lane 05f916e6ad Adjust subquery qual pushdown rules to be more forgiving: if a qual
refers to a non-DISTINCT output column of a DISTINCT ON subquery, or
if it refers to a function-returning-set, we cannot push it down.
But the old implementation refused to push down *any* quals if the
subquery had any such 'dangerous' outputs.  Now we just look at the
output columns actually referenced by each qual expression.  More code
than before, but probably no slower since we don't make unnecessary checks.
2003-03-22 01:49:38 +00:00
Tom Lane e43094b124 Fix compile warning. 2003-03-21 23:18:52 +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
Peter Eisentraut 1a7f4ed525 Make "win" a separate port from "cygwin". This means you can now
configure under native Windows (MinGW that is), but you won't get very far
compiling yet.  The dynaloader files are from Jan Wieck's patch set.
2003-03-21 17:18:34 +00:00
Bruce Momjian 93331d8318 Remove mention of transactions for insensitive cursors. 2003-03-21 17:11:46 +00:00
Bruce Momjian 063da9dce6 Fix ALTER TABLE / CLUSTER ON breakage.
Alvaro Herrera1
2003-03-21 15:43:02 +00:00
Michael Meskes b8f7d3d0b6 Do not free prepares statements at the end of a transaction. 2003-03-21 15:31:04 +00:00
Michael Meskes 524e9d62a7 Changes to the parser to accept new datatypes. 2003-03-21 14:17:47 +00:00
Bruce Momjian 9a9719e482 Allow error query to start transaction in autocommit off mode. 2003-03-21 04:33:15 +00:00
Bruce Momjian 3bb7e1ef11 Fix sequence casting. 2003-03-21 03:55:21 +00:00
Bruce Momjian c7d17a551a Done:
> * -Change NUMERIC data type to use base 10,000 internally
2003-03-21 03:47:38 +00:00
Bruce Momjian 7542f10325 Improve psql comment coding. 2003-03-21 03:28:29 +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 5ae424529b Fix multiline C comments in psql. 2003-03-20 22:08:50 +00:00
Bruce Momjian e5f5e73fcb Update for new serial functionality. 2003-03-20 21:00:49 +00:00