summaryrefslogtreecommitdiff
path: root/src/backend/parser
AgeCommit message (Collapse)Author
2000-08-29This is mostly the same as an earlier patch IBruce Momjian
didn't hear anything about, but which would have broken with the function manager changes anyway. Well, this patch checks that a unique constraint of some form (unique or pk) is on the referenced columns of an FK constraint and that the columns in the referencing table exist at creation time. The former is to move closer to SQL compatibility and the latter is in answer to a bug report. I also added a basic check of this functionality to the alter table and foreign key regression tests. Stephan Szabo sszabo@bigpanda.com
2000-08-28New configure test for flex, which recognizes only flex but does so in allPeter Eisentraut
incarnations (I hope). When an acceptable flex version is not found, print instructive error messages from both configure and the makefiles, so that users can continue building anyway.
2000-08-26Rename BITSPERBYTE to BITS_PER_BYTE to avoid conflict with <values.h>Tom Lane
on some platforms.
2000-08-24SQL-language functions are now callable in ordinary fmgr contexts ...Tom Lane
for example, an SQL function can be used in a functional index. (I make no promises about speed, but it'll work ;-).) Clean up and simplify handling of functions returning sets.
2000-08-22Make scanner multibyte aware. Currently it may produce an incorrectTatsuo Ishii
multibyte sequence while truncating identifiers.
2000-08-22Make makeObjectName multibyte aware. Currently, it may produceTatsuo Ishii
incorrect multibyte sequence while truncating too long names.
2000-08-20Make functional indexes accept binary-compatible functions, for exampleTom Lane
CREATE INDEX fooi ON foo (lower(f1)) where f1 is varchar rather than text.
2000-08-12Mop-up for removal of ':' and ';' operators ... like, say, actuallyTom Lane
take 'em out of pg_operator. Also remove from scan.l's set of legal operator characters. Update documentation.
2000-08-11copyObject() and equal() now know about all parse-time node types,Tom Lane
including utility statements. Still can't copy or compare executor state, but at present that doesn't seem to be necessary. This makes it possible to execute most (all?) utility statements in plpgsql. Had to change parsetree representation of CreateTrigStmt so that it contained only legal Nodes, and not bare string constants.
2000-08-08Remove 'func_tlist' from Func expression nodes, likewise 'param_tlist'Tom Lane
from Param nodes, per discussion a few days ago on pghackers. Add new expression node type FieldSelect that implements the functionality where it's actually needed. Clean up some other unused fields in Func nodes as well. NOTE: initdb forced due to change in stored expression trees for rules.
2000-08-07TOAST mop-up work: update comments for tuple-size-related symbols suchTom Lane
as MaxHeapAttributeNumber. Increase MaxAttrSize to something more reasonable (given what it's used for, namely checking char(n) declarations, I didn't make it the full 1G that it could theoretically be --- 10Mb seemed a more reasonable number). Improve calculation of MaxTupleSize.
2000-08-07Allow LIKE and ILIKE as TokenId (and hence ColId) to make sure that theyThomas G. Lockhart
are allowed in the func_name production. Otherwise, we can't define more like() and ilike() functions for new data types.
2000-08-06Implement LIKE/ESCAPE. Change parser to use like()/notlike()Thomas G. Lockhart
rather than the "~~" operator; this made it easy to add ESCAPE features. Implement ILIKE, NOT ILIKE, and the ESCAPE clause for them. afaict this is not MultiByte clean, but lots of other stuff isn't either. Fix up underlying support code for LIKE/NOT LIKE. Things should be faster and does not require internal string copying. Update regression test to add explicit checks for LIKE/NOT LIKE/ILIKE/NOT ILIKE. Remove colon and semi-colon operators as threatened in 7.0. Implement SQL99 COMMIT/AND NO CHAIN. Throw elog(ERROR) on COMMIT/AND CHAIN per spec since we don't yet support it. Implement SQL99 CREATE/DROP SCHEMA as equivalent to CREATE DATABASE. This is only a stopgap or demo since schemas will have another implementation soon. Remove a few unused production rules to get rid of warnings which crept in on the last commit. Fix up tabbing in some places by removing embedded spaces.
2000-08-06Support SQL99 embedded double-quote syntax for quoted identifiers.Thomas G. Lockhart
Allow this in the parser and in pg_dump, but it is probably not enough for a complete solution. Better to have the feature started then never here.
2000-08-03Modify heap_open()/heap_openr() API per pghackers discussion of 11 July.Tom Lane
These two routines will now ALWAYS elog() on failure, whether you ask for a lock or not. If you really want to get a NULL return on failure, call the new routines heap_open_nofail()/heap_openr_nofail(). By my count there are only about three places that actually want that behavior. There were rather more than three places that were missing the check they needed to make under the old convention :-(.
2000-08-03More functions updated to new fmgr style --- money, name, tid datatypes.Tom Lane
We're reaching the mopup stage here (good thing too, this is getting tedious).
2000-07-30Type lztext is toast.Tom Lane
(Sorry, couldn't help it...) Removed type filename as well, since it's unused and probably useless. INITDB FORCED, because pg_rewrite columns are now plain text again.
2000-07-28Fix acceptance of PATH as a type and column name.Thomas G. Lockhart
Note that this has changed some of the edge cases for what is accepted as a type name and/or column id. Regression test passes, but more tweaks may be coming...
2000-07-19Add distprep target to take some of the job of the release_prep script.Peter Eisentraut
The latter updated accordingly. Also add `dist' and `distcheck' targets to play with, but caveat packager. Updated backend/bootstrap and backend/parser makefile to make them marginally builddir aware and fix the usual set of things. Add rule to automatically remake config.h dependent on config.h.in and config.status. (Adopted from Autoconf manual and about every other package.) On a good day we should now have a complete and accurate set of dependencies throughout everything.
2000-07-17Revise aggregate functions per earlier discussions in pghackers.Tom Lane
There's now only one transition value and transition function. NULL handling in aggregates is a lot cleaner. Also, use Numeric accumulators instead of integer accumulators for sum/avg on integer datatypes --- this avoids overflow at the cost of being a little slower. Implement VARIANCE() and STDDEV() aggregates in the standard backend. Also, enable new LIKE selectivity estimators by default. Unrelated change, but as long as I had to force initdb anyway...
2000-07-15Remove useless and dangerous 'opt_type' option from CREATE INDEX.Tom Lane
2000-07-14Implement nested block comments in the backend and in psql.Thomas G. Lockhart
Include updates for the comment.sql regression test. Implement SET SESSION CHARACTERISTICS and SET DefaultXactIsoLevel. Implement SET SESSION CHARACTERISTICS TRANSACTION COMMIT and SET AutoCommit in the parser only. Need to add code to actually do something. Implement WITHOUT TIME ZONE type qualifier. Define SCHEMA keyword, along with stubbed-out grammar. Implement "[IN|INOUT|OUT] [varname] type" function arguments in parser only; INOUT and OUT throws an elog(ERROR). Add PATH as a type-specific token, since PATH is in SQL99 to support schema resource search and resolution.
2000-07-14Include rule to build include/parser/parse.h since nothing else canThomas G. Lockhart
build in this directory otherwise :(
2000-07-09oidvectortypes: use SQL type names and separate by commasPeter Eisentraut
psql \df: use format_type and oidvectortypes map type REAL to float4, not float8 psql \dd :work around UNION bug
2000-07-07- format_type function, in use by psqlPeter Eisentraut
- added bigint as synonym of int8 - set typelem of varlen non-array types to 0
2000-07-05Update textin() and textout() to new fmgr style. This is just phaseTom Lane
one of updating the whole text datatype, but there are so dang many calls of these two routines that it seems worth a separate commit.
2000-07-03TOASTJan Wieck
WARNING: This is actually broken - we have self-deadlocks due to concurrent changes in buffer management. Vadim and me are working on it. Jan
2000-07-02Attached is a new patch which addresses this problem. (oids inBruce Momjian
regression tests). Chris Bitmead
2000-07-02Remove memory leak from VACUUM parsing.Tom Lane
2000-06-22Second pass over run-time configuration system. Adjust priorities on somePeter Eisentraut
option settings. Sort out SIGHUP vs BACKEND -- there is no total ordering here, so make explicit checks. Add comments explaining all of this. Removed permissions check on SHOW command. Add examine_subclass to the game, rename to SQL_inheritance to fit the official data model better. Adjust documentation. Standalone backend needs to reset all options before it starts. To facilitate that, have IsUnderPostmaster be set by the postmaster itself, don't wait for the magic -p switch. Also make sure that all environment variables and argv's survive init_ps_display(). Use strdup where necessary. Have initdb make configuration files (postgresql.conf, pg_hba.conf) mode 0600 -- having configuration files is no fun if you can't edit them.
2000-06-20Fix handling of type tuple associated with a temp relation. We haveTom Lane
to apply the tempname->realname mapping to type name lookup as well as relation name lookup, else the type tuple will not be found when wanted. This fixes bugs like this one: create temp table foo (f1 int); select foo.f2 from foo; ERROR: Unable to locate type name 'foo' in catalog
2000-06-17Fix performance problems with pg_index lookups (see, for example,Tom Lane
discussion of 5/19/00). pg_index is now searched for indexes of a relation using an indexscan. Moreover, this is done once and cached in the relcache entry for the relation, in the form of a list of OIDs for the indexes. This list is used by the parser and executor to drive lookups in the pg_index syscache when they want to know the properties of the indexes. Net result: index information will be fully cached for repetitive operations such as inserts.
2000-06-15Final #include cleanup.Bruce Momjian
2000-06-15Clean up #include's.Bruce Momjian
2000-06-14Big warnings cleanup for Solaris/GCC. Down to about 40 now, butPeter Eisentraut
we'll get there one day. Use `cat' to create aclocal.m4, not `aclocal'. Some people don't have automake installed. Only run the autoconf rule in the top-level GNUmakefile if the invoker specified `make configure', don't run it automatically because of CVS timestamp skew.
2000-06-13Another batch of fmgr updates. I think I have gotten all old-styleTom Lane
functions that take pass-by-value datatypes. Should be ready for port testing ...
2000-06-12Rename rule CURRENT to OLD in source tree. Add mapping for backwardBruce Momjian
compatiblity with old rules.
2000-06-12Back out pg_shadow changes to allow create table and locking permissions.Bruce Momjian
2000-06-11Update sequence-related functions to new fmgr style. Remove downcasing,Tom Lane
quote-stripping, and acl-checking tasks for these functions from the parser, and do them at function execution time instead. This fixes the failure of pg_dump to produce correct output for nextval(Foo) used in a rule, and also eliminates the restriction that the argument of these functions must be a parse-time constant.
2000-06-09 I have large database and with this DB work more users and I very needBruce Momjian
more restriction for fretful users. The current PG allow define only NO-CREATE-DB and NO-CREATE-USER restriction, but for some users I need NO-CREATE-TABLE and NO-LOCK-TABLE. This patch add to current code NOCREATETABLE and NOLOCKTABLE feature: CREATE USER username [ WITH [ SYSID uid ] [ PASSWORD 'password' ] ] [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ] -> [ CREATETABLE | NOCREATETABLE ] [ LOCKTABLE | NOLOCKTABLE ] ...etc. If CREATETABLE or LOCKTABLE is not specific in CREATE USER command, as default is set CREATETABLE or LOCKTABLE (true). A user with NOCREATETABLE restriction can't call CREATE TABLE or SELECT INTO commands, only create temp table is allow for him. Karel
2000-06-09Inheritance overhaul by Chris Bitmead <chris@bitmead.com>Bruce Momjian
2000-06-08Mark functions as static and ifdef NOT_USED as appropriate.Bruce Momjian
2000-06-07Gen_fmgrtab.sh is strange: it is a platform dependent way (because it usesPeter Eisentraut
CPP) to create platform independent files. Unfortunately, that means that every config.status (or configure) run invariably causes a relink of the postmaster and also that we can't put these files in the distribution (usefully). So we make it a little smarter: when the output files already exist and it notices that it would recreate them in identical form, it doesn't touch them. In order to avoid re-running the make rule all the time we update a timestamp file instead. Update release_prep accordingly. Also make Gen_fmgrtab.sh use the awk that is detected at configure time, not necessarily named `awk' and have it check for exit statuses a little better. In other news... Remove USE_LOCALE from the templates, it was set to `no' everywhere anyway. Also remove YACC and YFLAGS from the templates, configure is smart enough to find bison or yacc itself. Use AC_PROG_YACC for that instead of the hand-crafted code. Do not set YFLAGS to `-d'. The make rules that need this flag should explicitly invoke it. YFLAGS should be a user variable. Update the makefiles to that effect.
2000-06-06typeTypeName() must return a pstrdup'd copy of the type name, not aTom Lane
direct pointer into the syscache entry for the type. In some cases the syscache entry might get flushed before we are done using the returned type name. This bug accounts for difficult-to-repeat failures seen when INSERTs into columns of certain data types are run in parallel with VACUUMs of system tables. There may be related problems elsewhere --- we need to take a harder look at uses of syscache data.
2000-06-05Latest round of fmgr updates. All functions with bool,char, or int2Tom Lane
inputs have been converted to newstyle. This should go a long way towards fixing our portability problems with platforms where char and short parameters are passed differently from int-width parameters. Still more to do for the Alpha port however.
2000-06-03New warning code about auto-created range table entries.Bruce Momjian
2000-06-01Lexer defended us against overlength plain identifiers, but not againstTom Lane
overlength quoted identifiers. Death and destruction ensue...
2000-05-31The heralded `Grand Unified Configuration scheme' (GUC)Peter Eisentraut
That means you can now set your options in either or all of $PGDATA/configuration, some postmaster option (--enable-fsync=off), or set a SET command. The list of options is in backend/utils/misc/guc.c, documentation will be written post haste. pg_options is gone, so is that pq_geqo config file. Also removed were backend -K, -Q, and -T options (no longer applicable, although -d0 does the same as -Q). Added to configure an --enable-syslog option. changed all callers from TPRINTF to elog(DEBUG)
2000-05-30Third round of fmgr updates: eliminate calls using fmgr() andTom Lane
fmgr_faddr() in favor of new-style calls. Lots of cleanup of sloppy casts to use XXXGetDatum and DatumGetXXX ...
2000-05-30Remove unused include files. Do not touch /port or includes used by defines.Bruce Momjian