Commit Graph

20742 Commits

Author SHA1 Message Date
Tom Lane e5d6b91220 Add SET ROLE. This is a partial commit of Stephen Frost's recent patch;
I'm still working on the has_role function and information_schema changes.
2005-07-25 22:12:34 +00:00
Bruce Momjian f5df006a04 Add username for psql password prompt, if the username was specified.
Adrian Maier
2005-07-25 17:17:41 +00:00
Bruce Momjian 9ad9e694ac Add:
> 	o Allow postgresql.conf file values to be changed via an SQL API
> 	o Allow the server to be stopped/restarted via an SQL API
2005-07-25 15:27:06 +00:00
Tom Lane 4a2972d691 Awhile back we replaced all uses of strcasecmp and strncasecmp with
pg_strcasecmp and pg_strncasecmp ... but I see some of the former have
crept back in.
Eternal vigilance is the price of locale independence, apparently.
2005-07-25 04:52:32 +00:00
Tom Lane cb504a41b2 Change build of regress.so to use Makefile.shlib instead of depending
on the not-very-good .so pattern rules in the port-specific Makefiles.
(This leaves only pgxs' MODULES case needing those rules.)  Also,
compile pgsleep.c locally and add it to regress.so to avoid failure
on AIX.
2005-07-25 00:58:27 +00:00
Tom Lane ac652466ec Partial fixes for contrib build on AIX: include -lm where needed.
Per Rocco Altier.
2005-07-24 23:30:10 +00:00
Tom Lane d675226e20 Regenerate badly-obsolete README file. 2005-07-24 17:18:52 +00:00
Tom Lane 4c80071b81 With the interval/day patch, the horology regression test no longer
fails near DST transition days, so remove the advice about that testing
problem.  Also improve the description of variant-comparison-file
selection.
2005-07-24 17:07:18 +00:00
Tom Lane a8a3c3c4d6 Add variant expected file to cope with different spelling of a Python
error message in Python 2.3 and before.  Per Michael Fuhr and buildfarm
results.
2005-07-24 14:53:42 +00:00
Bruce Momjian 8b60f8e6c9 Fix rounding problem in interval_div by using rint(), and improve
interval_mul function.
2005-07-24 04:37:07 +00:00
Tom Lane c17abc1c54 Fix logic error in tbm_intersect: the intersection of a normal page and
a lossy page has to be lossy, because we don't know exactly which tuples
on the page should remain part of the bitmap.  Per Jie Zhang.
2005-07-24 02:25:26 +00:00
Tom Lane eaa5d52bfe Fix some failures to initialize table entries induced by recent autovacuum
integration.  Not clear this explains recent stats problems, but it's
definitely wrong.
2005-07-24 00:33:28 +00:00
Tom Lane d007a95055 Simple constraint exclusion. For now, only child tables of inheritance
scans are candidates for exclusion; this should be fixed eventually.
Simon Riggs, with some help from Tom Lane.
2005-07-23 21:05:48 +00:00
Bruce Momjian 9af9d674c6 Remove unintended code addition. 2005-07-23 15:31:16 +00:00
Bruce Momjian 4098c8867d Macro alignment cleanup. 2005-07-23 15:29:47 +00:00
Bruce Momjian f76f24dfff Improve computations of interval_div to prevent rounding problem on AIX. 2005-07-23 14:53:21 +00:00
Bruce Momjian 3dbbbbf8e9 Andrew pointed out that the current fix didn't handle dates that were
near daylight savings time boudaries.  This handles it properly, e.g.

        test=> select '2005-04-03 04:00:00'::timestamp at time zone
        'America/Los_Angeles';
                timezone
        ------------------------
         2005-04-03 07:00:00-04
        (1 row)
2005-07-23 14:25:34 +00:00
Tom Lane 6c61b0d93c In the stats test, delay for the stats collector to catch up using a
function that actually sleeps, instead of busy-waiting.  Perhaps this
will resolve some of the intermittent stats failures we keep seeing.
2005-07-23 14:18:57 +00:00
Bruce Momjian 5ddeffb676 Fix AT TIME ZONE for timestamps without time zones:
test=> select (CURRENT_DATE + '05:00'::time)::timestamp at time zone
	'Canada/Pacific';
	        timezone
	------------------------
	 2005-07-22 08:00:00-04
	(1 row)
2005-07-23 02:02:27 +00:00
Bruce Momjian 261026575d Fix AT TIME ZONE for timestamps without time zones:
test=> select ('2005-07-20 00:00:00'::timestamp without time zone) at
	time zone 'Europe/Paris';
	        timezone
	------------------------
	 2005-07-19 22:00:00-04

Udpate documentation.
2005-07-22 21:16:15 +00:00
Tom Lane 4749e914ae Fix insufficient check for overflow in tm2abstime(), per report from jw. 2005-07-22 19:55:50 +00:00
Tom Lane 37c443eefd Fix compare_fuzzy_path_costs() to behave a bit more sanely. The original
coding would ignore startup cost differences of less than 1% of the
estimated total cost; which was OK for normal planning but highly not OK
if a very small LIMIT was applied afterwards, so that startup cost becomes
the name of the game.  Instead, compare startup and total costs fuzzily
but independently.  This changes the plan selected for two queries in the
regression tests; adjust expected-output files for resulting changes in
row order.  Per reports from Dawid Kuroczko and Sam Mason.
2005-07-22 19:12:02 +00:00
Bruce Momjian 3758affc9b More removal of unneeded parentheses. 2005-07-22 19:00:55 +00:00
Bruce Momjian ca256f3254 More spacing adjustments 2005-07-22 15:15:38 +00:00
Bruce Momjian 75e5aba7fe Update date/time comments. 2005-07-22 05:08:26 +00:00
Bruce Momjian a07628b070 More minor spacing improvements. 2005-07-22 05:03:09 +00:00
Bruce Momjian d5f1e08c0c Code spacing improvement, particularly *tm spacing. 2005-07-22 03:46:34 +00:00
Bruce Momjian e9c44bd382 More comment update of time macros. 2005-07-21 20:37:21 +00:00
Bruce Momjian e6b72d6af6 Update DAYS_PER_MONTH comment.
Add SECS_PER_YEAR and MINS_PER_HOUR macros.
2005-07-21 18:06:13 +00:00
Bruce Momjian a0407f508a Add comment about void* use in MemSet. 2005-07-21 15:16:30 +00:00
Bruce Momjian 0e5c62d065 Add:
<
> * Research storing disk pages with no alignment/padding
2005-07-21 13:43:16 +00:00
Bruce Momjian b4bdab8105 Fix integer timestamp build for macro changes. 2005-07-21 05:18:26 +00:00
Bruce Momjian aa0f6e8d06 Add comment marking non-exact time conversion macros. 2005-07-21 04:48:42 +00:00
Bruce Momjian 9dbd00b0e2 Remove unnecessary parentheses in assignments.
Add spaces where needed.
Reference time interval variables as tinterval.
2005-07-21 04:41:43 +00:00
Tom Lane 3976899f29 Fix storage size for btree_gist interval indexes. Fix penalty
calculations for interval and time/timetz to behave sanely for both
integer and float timestamps; up to now I think it's been doing
something pretty strange...
2005-07-21 04:15:04 +00:00
Bruce Momjian a536b2dd80 Add time/date macros for code clarity:
#define DAYS_PER_YEAR   365.25
	#define MONTHS_PER_YEAR 12
	#define DAYS_PER_MONTH  30
	#define HOURS_PER_DAY   24
2005-07-21 03:56:25 +00:00
Tom Lane dc73819f2e Fix breakage of INSTALL document build. 2005-07-20 23:57:46 +00:00
Bruce Momjian a45f4c2533 /contrib/btree_gist adjustments for new 'day' interval value. 2005-07-20 18:17:39 +00:00
Bruce Momjian ddc038cad2 Update catalog version for INTERVAL day addition. 2005-07-20 17:24:39 +00:00
Bruce Momjian db05f4a7eb Add 'day' field to INTERVAL so 1 day interval can be distinguished from
24 hours. This is very helpful for daylight savings time:

	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours';
	      ?column?
	----------------------
	2005-05-04 01:00:00-04

	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day';
	      ?column?
	----------------------
	2005-05-04 01:00:00-04

Michael Glaesemann
2005-07-20 16:42:32 +00:00
Bruce Momjian 826604f9e6 Fix interval division and multiplication, before:
test=> select '4 months'::interval / 5;
	   ?column?
	---------------
	 1 mon -6 days
	(1 row)

after:

	test=> select '4 months'::interval / 5;
	 ?column?
	----------
	 24 days
	(1 row)

The problem was the use of rint() to round, and then find the remainder,
causing the negative values.
2005-07-20 03:50:24 +00:00
Neil Conway ca76df425b Documentation tweak: make <command>CREATE OPERATOR CLASS</command> into
an <xref/>.
2005-07-19 01:27:59 +00:00
Tom Lane 37464a0326 Fix some bogosities in geometric-function documentation: add an entry
for circle(polygon), which was missing; remove bogus entry for
point(lseg, lseg), which does not exist, and the documentation seemed to
describe lseg_interpt, which we already document as an operator not a
function.  Also remove entry for box_intersect, which likewise is
preferentially used via the operator #.
2005-07-18 22:34:14 +00:00
Bruce Momjian 507465525e \pset numericsep -> numericlocale. 2005-07-18 20:57:53 +00:00
Bruce Momjian 71d0cabecd Fix len so decimal length is only added when a period appears in the output. 2005-07-18 19:27:37 +00:00
Tom Lane affcb4371c Avoid use of E'', and thereby creating an unnecessary version-dependency,
by using LIKE...ESCAPE instead.  Per suggestion by andrew@supernews.
2005-07-18 19:12:09 +00:00
Tom Lane fdd84469f7 Avoid need for E'' construct by using regexp instead of LIKE. More
readable, and more like the other places in this file.
2005-07-18 19:09:09 +00:00
Bruce Momjian adeede1391 Fix numiericsep length computations.
Eugen Nedelcu
2005-07-18 18:58:45 +00:00
Tom Lane df38d799ea Adjust psql describe queries so that any pg_foo_is_visible() condition
is applied last, after other constraints such as name patterns.  This
is useful first because the pg_foo_is_visible() functions are relatively
expensive, and second because it minimizes the prospects for race
conditions.  The change is fragile though since it makes unwarranted
assumptions about planner behavior, ie, that WHERE clauses will be
executed in the original order if there's not reason to change it.
This should fix ... or at least hide ... an intermittent failure in the
prepared_xacts regression test, while we think about what else to do.
2005-07-18 17:40:14 +00:00
Tom Lane 24ce1438c0 pgcrypto documentation update. Marko Kreen 2005-07-18 17:17:12 +00:00