Commit Graph

12560 Commits

Author SHA1 Message Date
Tom Lane f9e4f611a1 First pass at set-returning-functions in FROM, by Joe Conway with
some kibitzing from Tom Lane.  Not everything works yet, and there's
no documentation or regression test, but let's commit this so Joe
doesn't need to cope with tracking changes in so many files ...
2002-05-12 20:10:05 +00:00
Tom Lane 71009354c8 Update for additional options in CREATE OPERATOR. 2002-05-11 02:09:41 +00:00
Tom Lane 9b5ca7ee0c Forgot to handle 'opaque' function arguments in regprocedurein/out. 2002-05-11 00:24:16 +00:00
Tom Lane 9f0ae0c820 First pass at schema-fying pg_dump/pg_restore. Much to do still,
but the basic capability seems to work.
2002-05-10 22:36:27 +00:00
Tom Lane 1011fb651d Suppress duplicate logging of utility commands under debug_print_query. 2002-05-10 20:22:13 +00:00
Peter Eisentraut 1944bff1d6 Make initdb print a message about which locale it is about to use.
Re-add warning if the locale prevents LIKE-optimization.  Done within
initdb now.
2002-05-09 13:30:24 +00:00
Hiroshi Inoue 16e22de53a Add a file for version control. 2002-05-09 04:10:22 +00:00
Tom Lane 2822788993 Accept SET SESSION AUTHORIZATION DEFAULT and RESET SESSION AUTHORIZATION
to reset session userid to the originally-authenticated name.  Also,
relax SET SESSION AUTHORIZATION to allow specifying one's own username
even if one is not superuser, so as to avoid unnecessary error messages
when loading a pg_dump file that uses this command.  Per discussion from
several months ago.
2002-05-06 19:47:30 +00:00
Tom Lane 15162aef24 Make dumpACL behave more reasonably for case where owner has revoked
some of his own privileges.
2002-05-06 18:33:45 +00:00
Tom Lane 340b66cc70 Cause fmtId to always use its internal buffer for the returned value,
in hopes of making erroneous usage more apparent.  Per discussion 15-Apr.
2002-05-06 17:34:45 +00:00
Tom Lane 1cf693ab86 Reorder snapshot checks to save a couple comparisons in the common case,
where the tuple's xmin or xmax is older than the snapshot xmin.  There
is no need to check it against snapshot xmax in that case.
2002-05-06 02:39:01 +00:00
Tom Lane 205b5c2f4b A little paranoia never hurt anyone. 2002-05-05 17:50:04 +00:00
Tom Lane c0e9dc1229 plpgsql_dstring_append was broken for long strings. 2002-05-05 17:38:26 +00:00
Tom Lane 846429e3d6 Not needed anymore. 2002-05-05 16:47:09 +00:00
Tom Lane d15c30d327 Add missing includes. 2002-05-05 16:14:24 +00:00
Tom Lane 17ea23dd17 Add a trivial testbed for pg_sema and pg_shmem code. 2002-05-05 16:02:37 +00:00
Tom Lane 2010a43fcb Cope with case that SEM_FAILED is not defined (assume failure code is -1) 2002-05-05 16:01:50 +00:00
Tom Lane 8df5625966 First test of Darwin port with POSIX semaphore code. 2002-05-05 01:03:26 +00:00
Tom Lane 3e48c66136 Fix code to work when isalpha and friends are macros, not functions. 2002-05-05 00:50:31 +00:00
Tom Lane 72a3902a66 Create an internal semaphore API that is not tied to SysV semaphores.
As proof of concept, provide an alternate implementation based on POSIX
semaphores.  Also push the SysV shared-memory implementation into a
separate file so that it can be replaced conveniently.
2002-05-05 00:03:29 +00:00
Tom Lane 91fc10fdac Fix compile errors in CYR_RECODE code, per report from Oliver Elphick. 2002-05-03 20:43:30 +00:00
Tom Lane 90739d4621 Make ruleutils.c schema-aware. Displayed names are schema-qualified
only if they would not be found without qualification given the current
search path, as per idea from Peter Eisentraut.
2002-05-03 20:15:02 +00:00
Tom Lane 1a69a37d5b Fix obsolete comments. 2002-05-03 17:42:11 +00:00
Tom Lane d662f29302 Use quote_identifier on relation names in EXPLAIN output, per suggestion
from Liam Stewart.  Minor code cleanups also.
2002-05-03 15:56:45 +00:00
Tom Lane 4a2fe8e03d Fix typo in usage instructions. 2002-05-03 14:21:38 +00:00
Tom Lane 8338cc03a8 Remove the last traces of datatypes datetime and timespan. 2002-05-03 04:11:08 +00:00
Tom Lane 53cedcac22 Retire xlateSqlType/xlateSqlFunc; all type name translations are now
handled as special productions.  This is needed to keep us honest about
user-schema type names that happen to coincide with system type names.
Per pghackers discussion 24-Apr.  To avoid bloating the keyword list
too much, I removed the translations for datetime, timespan, and lztext,
all of which were slated for destruction several versions back anyway.
2002-05-03 00:32:19 +00:00
Tom Lane c2def1b128 Fix backslash-n typo, per Joe Conway. 2002-05-02 21:44:43 +00:00
Tom Lane 3220fd2138 Tweak scanner/grammar interface so that the keyword-as-identifier rules
in gram.y can make use of the keywords.c string table, instead of having
their own copies of the keyword strings.  This saves a few kilobytes and
more importantly eliminates an opportunity for cut-and-paste errors.
2002-05-02 18:44:11 +00:00
Tom Lane 0041a3d72f Add routines in namespace.c to determine whether objects are visible
in the search path.  (We might want to make these available as SQL
functions too, but I haven't done that yet.)  Fix format_type to be
schema-aware.
2002-05-01 23:06:41 +00:00
Tom Lane a829cbb877 Give left_oper() and right_oper() noError parameters like oper() (the
binary case) already has.  Needed for upcoming ruleutils change.
2002-05-01 19:26:08 +00:00
Tom Lane 61446e0927 Improve lexer's error reporting. You get the whole token mentioned now
in parse error messages, not just the part scanned by the last flex rule.
For example,
	select "foo" "bar";
used to draw
	ERROR:  parser: parse error at or near """
which was rather unhelpful.  Now it gives
	ERROR:  parser: parse error at or near ""bar""
Also, error messages concerning bitstring literals and suchlike will
quote the source text at you, not the processed internal form of the literal.
2002-05-01 17:12:08 +00:00
Jan Wieck 241978b91b The attached patch fixes 4 instances of missing simi-colons in the
PL/PgSQL grammar, which were causing warnings when used with Bison
1.35.

Neil Conway <neilconway@rogers.com>
2002-05-01 12:40:22 +00:00
Hiroshi Inoue d1406f1b1e Change heap_get_latest_tid() so that a transaction can
see changes made by the transaction itself.
2002-05-01 01:23:37 +00:00
Tom Lane 936afc8a4b Fix obj_description() and col_description() functions to work reliably
in presence of schemas.
2002-04-30 21:01:52 +00:00
Tom Lane 1e4f34f309 Document that NAMEDATALEN must be a multiple of sizeof(int). 2002-04-30 19:53:03 +00:00
Tom Lane e4f06dc12e Clean up loose ends remaining from schema privileges discussion.
I concluded that RENAME should require CREATE privilege on the namespace
as well as ownership of the table.
2002-04-30 01:26:26 +00:00
Tom Lane 4c25a0655b Code review for ALTER TRIGGER RENAME patch: make better use of index,
don't scribble on tuple returned by table scan.
2002-04-30 01:24:57 +00:00
Tom Lane 857661ba2e Enforce EXECUTE privilege for aggregate functions. 2002-04-29 22:28:19 +00:00
Tom Lane ccfaf9067d Implement checking of USAGE rights on namespaces. 2002-04-29 22:15:07 +00:00
Tom Lane 88ef7067f7 Add cache invalidation callback hooks. 2002-04-29 22:14:34 +00:00
Tom Lane 8d615763da Add missing 'static' keyword to suppress compiler complaints.
gcc does not complain about this mistake, but other compilers do.
2002-04-29 17:30:18 +00:00
Tom Lane e896912ee9 Remove unnecessary/obsolete regproctooid() references. 2002-04-29 04:10:02 +00:00
Bruce Momjian c763cfa9e8 Add Polish FAQ from Marcin Mazurek. 2002-04-29 02:57:18 +00:00
Bruce Momjian ea43fec258 Fix problem with new pg_hba.conf code where the same comparison function
was incorrectly used for both qsort and bsearch.
2002-04-28 22:49:07 +00:00
Tom Lane 6c59886942 Second try at fixing join alias variables. Instead of attaching miscellaneous
lists to join RTEs, attach a list of Vars and COALESCE expressions that will
replace the join's alias variables during planning.  This simplifies
flatten_join_alias_vars while still making it easy to fix up varno references
when transforming the query tree.  Add regression test cases for interactions
of subqueries with outer joins.
2002-04-28 19:54:29 +00:00
Michael Meskes c8996f9c6b - Synced yet again.
- Fixed a typo in a comment printed by ecpg.
2002-04-28 17:20:03 +00:00
Tom Lane 25dfba3954 Make ruleutils.c use format_type for printing typenames. Minor tweaks
in quoting rules and recognition of implicit type coercions.
2002-04-28 00:49:13 +00:00
Tom Lane 7677fe0aa6 Minor code cleanup. 2002-04-28 00:36:38 +00:00
Tom Lane c06f6a6bc2 Support toasting of shared system relations, and provide toast tables for
pg_database, pg_shadow, pg_group, all of which now have potentially-long
fields.  Along the way, get rid of SharedSystemRelationNames list: shared
rels are now identified in their include/pg_catalog/*.h files by a
BKI_SHARED_RELATION macro, while indexes and toast rels inherit sharedness
automatically from their parent table.  Fix some bugs with failure to detoast
pg_group.grolist during ALTER GROUP.
2002-04-27 21:24:34 +00:00