summaryrefslogtreecommitdiff
path: root/src/backend/parser
AgeCommit message (Collapse)Author
2000-01-22added ALTER TABLE DROP COLUMN, early versionPeter Eisentraut
2000-01-22Forgot to handle column length defaults in ALTER TABLE ADD COLUMN.Tom Lane
2000-01-20Clean up longstanding gcc warnings by adding missing externTom Lane
declarations.
2000-01-20Assign a typmod of -1 to unadorned CHAR and NUMERIC type specs. ThisTom Lane
allows casts without specific length requirements to continue to work as they did before; that is, x::char will not truncate the value of x, whereas x::char(1) will. Likewise for NUMERIC precision/scale. The column length defaults of char(1) and numeric(30,6) are now inserted in analyze.c's processing of CREATE TABLE.
2000-01-19Removed MBFLAGS from makefiles since it's now done in include/config.h.Peter Eisentraut
2000-01-18another set of cleanupsPeter Eisentraut
2000-01-18Since this patch is not big I send it here instead. I do not have theBruce Momjian
complete source checked out so I cannot commit it myself. Michael
2000-01-18This corrects an error in current gram.y for ALTER TABLE ... ADDBruce Momjian
CONSTRAINT Oliver Elphick
2000-01-17Pass atttypmod to CoerceTargetExpr, so that it can pass it on toTom Lane
coerce_type, so that the right things happen when coercing a previously- unknown constant to a destination data type.
2000-01-17Create a new parsetree node type, TypeCast, so that transformation ofTom Lane
SQL cast constructs can be performed during expression transformation instead of during parsing. This allows constructs like x::numeric(9,2) and x::int2::float8 to behave as one would expect.
2000-01-16Included all yacc and lex files into the distribution.Peter Eisentraut
2000-01-16Fix broken FOR UPDATE error message.Tom Lane
2000-01-16Fix passing of atttypmod that Tom found.Bruce Momjian
2000-01-15Fixed all elog related warnings, as well as a few others.Peter Eisentraut
2000-01-14* User management commands no longer user pg_exec_query_dest -> more robustPeter Eisentraut
* Let unprivileged users change their own passwords. * The password is now an Sconst in the parser, which better reflects its text datatype and also forces users to quote them. * If your password is NULL you won't be written to the password file, meaning you can't connect until you have a password set up (if you use password authentication). * When you drop a user that owns a database you get an error. The database is not gone.
2000-01-13Fixed everything in and surrounding createdb and dropdb to make it morePeter Eisentraut
error-proof. Rearranged some old code and removed dead sections.
2000-01-10Make number of args to a function configurable.Bruce Momjian
2000-01-10Move fixes for >8 indexed fields.Bruce Momjian
2000-01-06Changed "triggered data change violation" detection codeJan Wieck
in trigger manager. Jan
1999-12-24Clean up handling of explicit NULL constants. Cases likeTom Lane
SELECT null::text; SELECT int4fac(null); work as expected now. In some cases a NULL must be surrounded by parentheses: SELECT 2 + null; fails SELECT 2 + (null); OK This is a grammatical ambiguity that seems difficult to avoid. Other than that, NULLs seem to behave about like you'd expect. The internal implementation is that NULL constants are typed as UNKNOWN (like untyped string constants) until the parser can deduce the right type.
1999-12-17Re-enable makeAttr() if ENABLE_OUTER_JOINS is defined.Thomas G. Lockhart
Somehow got bracketed with #ifdef NOT_USED instead.
1999-12-17Reverse out nextval patch.Bruce Momjian
1999-12-16Some changes to prepare for LONG attributes.Jan Wieck
Jan
1999-12-16>Turning nextval and currval into keywords is not an acceptable way toBruce Momjian
>go about this. That will risk breaking existing applications that use >those names as column names. > >It should actually almost work to write sq.nextval as things stand, >because Postgres has for a long time considered table.function and >function(table) to be interchangeable notations for certain kinds of >functions. nextval doesn't seem to be one of that kind of function, >at the moment. I'd suggest leaving the grammar as it was, and taking a >look at ParseFuncOrColumn in parse_func.c to see if you can't persuade >it to accept the sequence functions in that style. OK, good point. I tried to implement it somewhere else and ended up extending transformAttr. Attached you'll find the patch. Jeroen van Vianen
1999-12-16Here's the Create/Alter/Drop Group stuff that's been really overdue. IBruce Momjian
didn't have time for documentation yet, but I'll write some. There are still some things to work out what happens when you alter or drop users, but the group stuff in and by itself is done. -- Peter Eisentraut Sernanders väg 10:115
1999-12-14Depending on my interpreting (and programming) skills, this might solveBruce Momjian
anywhere from zero to two TODO items. * Allow flag to control COPY input/output of NULLs I got this: COPY table .... [ WITH NULL AS 'string' ] which does what you'd expect. The default is \N, otherwise you can use empty strings, etc. On Copy In this acts like a filter: every data item that looks like 'string' becomes a NULL. Pretty straightforward. This also seems to be related to * Make postgres user have a password by default If I recall this discussion correctly, the problem was actually that the default password for the postgres (or any) user is in fact "\N", because of the way copy is used. With this change, the file pg_pwd is copied out with nulls as empty strings, so if someone doesn't have a password, the password is just '', which one would expect from a new account. I don't think anyone really wants a hard-coded default password. Peter Eisentraut Sernanders väg 10:115
1999-12-13New LDOUT makefile variable for QNX os.Bruce Momjian
1999-12-13aggregate(DISTINCT ...) works, per SQL spec.Tom Lane
Note this forces initdb because of change of Aggref node in stored rules.
1999-12-12any_ordering_op()'s argument should be declared Oid not int.Tom Lane
1999-12-10Teach grammar and parser about aggregate(DISTINCT ...). No implementationTom Lane
yet, but at least we can give a better error message: regression=> select count(distinct f1) from int4_tbl; ERROR: aggregate(DISTINCT ...) is not implemented yet instead of 'parser: parse error at or near distinct'.
1999-12-10Remove unneeded action.Bruce Momjian
1999-12-10Rename several destroy* functions/tags to drop*.Bruce Momjian
1999-12-10Correct coredump in ALTER TABLE foo ADD(). Accept explicit NULL inTom Lane
typecasts, eg 'NULL::text'. Later parts of the parser don't like this yet, but I'll work on that next.
1999-12-09Make LD -r as macros that can be changed for QNX.Bruce Momjian
1999-12-09Replace generic 'Illegal use of aggregates' error message with one thatTom Lane
shows the specific ungrouped variable being complained of. Perhaps this will reduce user confusion...
1999-12-07Clean up memory leakage in find_inheritors() by using pg_list listsTom Lane
(which are palloc'd) instead of DLLists (which are malloc'd). Not very significant, since this routine seldom has anything useful to do, but a leak is a leak...
1999-12-06Completed FOREIGN KEY syntax.Jan Wieck
Added functionality for automatic trigger creation during CREATE TABLE. Added ON DELETE RESTRICT and some others. Jan
1999-11-30create/alter user extensionBruce Momjian
This one should work much better than the one I sent in previously. The functionality is the same, but the patch was missing one file resulting in the compilation failing. The docs also received a minor fix. Peter Eisentraut Sernanders väg 10:115
1999-11-22Add system indexes to match all caches.Bruce Momjian
Make all system indexes unique. Make all cache loads use system indexes. Rename *rel to *relid in inheritance tables. Rename cache names to be clearer.
1999-11-20Fix problems with CURRENT_DATE and related functions being used inTom Lane
table defaults or rules: translate them to a function call so that parse_coerce doesn't reduce them to a date or time constant immediately. Also, eliminate a lot of redundancy in the expression grammar by defining a new nonterminal com_expr, which contains all the productions that can be shared by a_expr and b_expr.
1999-11-15Implement subselects in target lists. Also, relax requirement thatTom Lane
subselects can only appear on the righthand side of a binary operator. That's still true for quantified predicates like x = ANY (SELECT ...), but a subselect that delivers a single result can now appear anywhere in an expression. This is implemented by changing EXPR_SUBLINK sublinks to represent just the (SELECT ...) expression, without any 'left hand side' or combining operator --- so they're now more like EXISTS_SUBLINK. To handle the case of '(x, y, z) = (SELECT ...)', I added a new sublink type MULTIEXPR_SUBLINK, which acts just like EXPR_SUBLINK used to. But the grammar will only generate one for a multiple-left-hand-side row expression.
1999-11-07New NameStr macro to convert Name to Str. No need for var.data anymore.Bruce Momjian
Fewer calls to nameout. Better use of RelationGetRelationName.
1999-11-01Eliminate local inefficiencies in updateTargetListEntry, make_var, andTom Lane
make_const --- don't repeat cache searches that aren't needed.
1999-10-29Make USING in COPY optional.Bruce Momjian
1999-10-29Fix wording.Bruce Momjian
1999-10-26Fix compile after COMMENT problem.Bruce Momjian
1999-10-26Hello.Bruce Momjian
The following patch extends the COMMENT ON functionality to the rest of the database objects beyond just tables, columns, and views. The grammer of the COMMENT ON statement now looks like: COMMENT ON [ [ DATABASE | INDEX | RULE | SEQUENCE | TABLE | TYPE | VIEW ] <objname> | COLUMN <relation>.<attribute> | AGGREGATE <aggname> <aggtype> | FUNCTION <funcname> (arg1, arg2, ...) | OPERATOR <op> (leftoperand_typ rightoperand_typ) | TRIGGER <triggername> ON relname> Mike Mascari (mascarim@yahoo.com)
1999-10-22I have a patch for postgresql-snapshot(1999-10-22).Bruce Momjian
This patch fix a TODO list item. * require SELECT DISTINCT target list to have all ORDER BY columns example ogawa=> select distinct x from t1 order by y; ERROR: ORDER BY columns must appear in SELECT DISTINCT target list --- Atsushi Ogawa
1999-10-18Remove fixed-size literal buffer from scan.l, and repairTom Lane
boundary-condition bug in myinput() which caused flex scanner to fail on tokens larger than a bufferload. Turns out flex doesn't want null- terminated input ... and if it gives you a 1-character buffer, you'd better supply a character, not a null, lest you be thought to be reporting end of input.
1999-10-15This patch implements ORACLE's COMMENT SQL command.Bruce Momjian
>From the ORACLE 7 SQL Language Reference Manual: ----------------------------------------------------- COMMENT Purpose: To add a comment about a table, view, snapshot, or column into the data dictionary. Prerequisites: The table, view, or snapshot must be in your own schema or you must have COMMENT ANY TABLE system privilege. Syntax: COMMENT ON [ TABLE table ] | [ COLUMN table.column] IS 'text' You can effectively drop a comment from the database by setting it to the empty string ''. ----------------------------------------------------- Example: COMMENT ON TABLE workorders IS 'Maintains base records for workorder information'; COMMENT ON COLUMN workorders.hours IS 'Number of hours the engineer worked on the task'; to drop a comment: COMMENT ON COLUMN workorders.hours IS ''; The current patch will simply perform the insert into pg_description, as per the TODO. And, of course, when the table is dropped, any comments relating to it or any of its attributes are also dropped. I haven't looked at the ODBC source yet, but I do know from an ODBC client standpoint that the standard does support the notion of table and column comments. Hopefully the ODBC driver is already fetching these values from pg_description, but if not, it should be trivial. Hope this makes the grade, Mike Mascari (mascarim@yahoo.com)