- 22 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
-
- 20 Jan, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 18 Jan, 2000 3 commits
-
-
Peter Eisentraut authored
-
Bruce Momjian authored
complete source checked out so I cannot commit it myself. Michael
-
Bruce Momjian authored
CONSTRAINT Oliver Elphick
-
- 17 Jan, 2000 1 commit
-
-
Tom Lane authored
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.
-
- 16 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
-
- 15 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
-
- 14 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
* 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.
-
- 13 Jan, 2000 1 commit
-
-
Peter Eisentraut authored
error-proof. Rearranged some old code and removed dead sections.
-
- 16 Dec, 1999 1 commit
-
-
Bruce Momjian authored
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
-
- 14 Dec, 1999 1 commit
-
-
Bruce Momjian authored
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
-
- 10 Dec, 1999 4 commits
-
-
Tom Lane authored
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'.
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Tom Lane authored
typecasts, eg 'NULL::text'. Later parts of the parser don't like this yet, but I'll work on that next.
-
- 06 Dec, 1999 1 commit
-
-
Jan Wieck authored
Added functionality for automatic trigger creation during CREATE TABLE. Added ON DELETE RESTRICT and some others. Jan
-
- 30 Nov, 1999 1 commit
-
-
Bruce Momjian authored
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
-
- 20 Nov, 1999 1 commit
-
-
Tom Lane authored
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.
-
- 15 Nov, 1999 1 commit
-
-
Tom Lane authored
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.
-
- 29 Oct, 1999 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
- 26 Oct, 1999 2 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
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)
-
- 15 Oct, 1999 1 commit
-
-
Bruce Momjian authored
>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)
-
- 07 Oct, 1999 1 commit
-
-
Tom Lane authored
mentioned in FROM but not elsewhere in the query: such tables should be joined over anyway. Aside from being more standards-compliant, this allows removal of some very ugly hacks for COUNT(*) processing. Also, allow HAVING clause without aggregate functions, since SQL does. Clean up CREATE RULE statement-list syntax the same way Bruce just fixed the main stmtmulti production. CAUTION: addition of a field to RangeTblEntry nodes breaks stored rules; you will have to initdb if you have any rules.
-
- 05 Oct, 1999 1 commit
-
-
Bruce Momjian authored
-
- 03 Oct, 1999 1 commit
-
-
Tom Lane authored
expressions in CREATE TABLE. There is no longer an emasculated expression syntax for these things; it's full a_expr for constraints, and b_expr for defaults (unfortunately the fact that NOT NULL is a part of the column constraint syntax causes a shift/reduce conflict if you try a_expr. Oh well --- at least parenthesized boolean expressions work now). Also, stored expression for a column default is not pre-coerced to the column type; we rely on transformInsertStatement to do that when the default is actually used. This means "f1 datetime default 'now'" behaves the way people usually expect it to. BTW, all the support code is now there to implement ALTER TABLE ADD CONSTRAINT and ALTER TABLE ADD COLUMN with a default value. I didn't actually teach ALTER TABLE to call it, but it wouldn't be much work.
-
- 02 Oct, 1999 1 commit
-
-
Tom Lane authored
not just C, so that ISCACHABLE attribute can be specified for user-defined functions. Get rid of ParamString node type, which wasn't actually being generated by gram.y anymore, even though define.c thought that was what it was getting. Clean up minor bug in dfmgr.c (premature heap_close).
-
- 29 Sep, 1999 1 commit
-
-
Jan Wieck authored
Implements the CREATE CONSTRAINT TRIGGER and SET CONSTRAINTS commands. TODO: Generic builtin trigger procedures Automatic execution of appropriate CREATE CONSTRAINT... at CREATE TABLE Support of new trigger type in pg_dump Swapping of huge # of events to disk Jan
-
- 28 Sep, 1999 4 commits
-
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
-
Bruce Momjian authored
functions. One problem that I have encountered with the function manager is that it does not allow the user to define type conversion functions that convert between user types. For instance if mytype1, mytype2, and mytype3 are three Postgresql user types, and if I wish to define Postgresql conversion functions like I run into problems, because the Postgresql dynamic loader would look for a single link symbol, mytype3, for both pieces of object code. If I just change the name of one of the Postgresql functions (to make the symbols distinct), the automatic type conversion that Postgresql uses, for example, when matching operators to arguments no longer finds the type conversion function. The solution that I propose, and have implemented in the attatched patch extends the CREATE FUNCTION syntax as follows. In the first case above I use the link symbol mytype2_to_mytype3 for the link object that implements the first conversion function, and define the Postgresql operator with the following syntax The patch includes changes to the parser to include the altered syntax, changes to the ProcedureStmt node in nodes/parsenodes.h, changes to commands/define.c to handle the extra information in the AS clause, and changes to utils/fmgr/dfmgr.c that alter the way that the dynamic loader figures out what link symbol to use. I store the string for the link symbol in the prosrc text attribute of the pg_proc table which is currently unused in rows that reference dynamically loaded functions. Bernie Frankpitt
-
- 23 Sep, 1999 1 commit
-
-
Bruce Momjian authored
-
- 14 Sep, 1999 1 commit
-
-
Thomas G. Lockhart authored
which do not need to be so for our parser. Apparently omitted earlier.
-
- 18 Aug, 1999 1 commit
-
-
Tatsuo Ishii authored
Now SET NAMES working again...
-
- 28 Jul, 1999 1 commit
-
-
Tom Lane authored
IN and NOT IN operators. Rewrite grotty implementation of IN-list parsing ... look Ma, no global variable ...
-
- 27 Jul, 1999 1 commit
-
-
Tom Lane authored
optimizer rather than parser. This has many advantages, such as not getting fooled by chance uses of operator names ~ and ~~ (the operators are identified by OID now), and not creating useless comparison operations in contexts where the comparisons will not actually be used as indexquals. The new code also recognizes exact-match LIKE and regex patterns, and produces an = indexqual instead of >= and <=. This change does NOT fix the problem with non-ASCII locales: the code still doesn't know how to generate an upper bound indexqual for non-ASCII collation order. But it's no worse than before, just the same deficiency in a different place... Also, dike out loc_restrictinfo fields in Plan nodes. These were doing nothing useful in the absence of 'expensive functions' optimization, and they took a considerable amount of processing to fill in.
-
- 20 Jul, 1999 1 commit
-
-
Tom Lane authored
support, but which the grammar was accepting. Also, fix several bugs having to do with failure to copy fields up from a subselect to a select or insert node.
-