Commit Graph

1296 Commits

Author SHA1 Message Date
Thomas G. Lockhart 43163cf5d6 Fix string conversions for operators in DEFAULT and CHECK clauses. 1997-09-16 16:11:20 +00:00
Thomas G. Lockhart bc85dbf893 Remove backdoor strings from scan.l for DEFAULT and CHECK.
Reconstruct string input for DEFAULT and CHECK.
Add DOUBLE PRECISION, CHARACTER (VARYING) SQL-92 data types.
1997-09-13 03:15:46 +00:00
Bruce Momjian fe54c54da3 Allow SELECT NULL as EMPTY_FIELD, Patrick. 1997-09-12 22:14:48 +00:00
Bruce Momjian 23db70bf73 Lex/yacc source cleanup like indent. 1997-09-08 03:20:18 +00:00
Vadim B. Mikheev bad4bc40b9 CREATE/DROP TRIGGER syntax 1997-09-04 13:24:26 +00:00
Thomas G. Lockhart 570620c569 Add SQL92 string handling features (SUBSTRING, TRIM, EXTRACT).
Add parsing for UNION and outer JOINs.
Implement SQL92 "WITH TIME ZONE".
Allow some reserved words as identifiers and column labels.
Clean up indentation and "orphan spaces and tabs".
1997-09-01 06:00:35 +00:00
Vadim B. Mikheev becd2f9b82 Fix for "default = '...'" in CREATE TYPE 1997-08-28 05:02:01 +00:00
Vadim B. Mikheev 9b6d8878fd There is no NULL constraint in CREATE TABLE - only NOT NULL one. 1997-08-22 03:17:55 +00:00
Vadim B. Mikheev e3accffe66 Syntax for [CONSTRAINT name] CHECK ... 1997-08-21 01:34:44 +00:00
Vadim B. Mikheev 4527172b80 CHECK/DEFAULT syntax 1997-08-20 01:12:38 +00:00
Vadim B. Mikheev b992e200b8 NOT NULL implementation (submitted by Robson Paniago de Miranda). 1997-08-19 04:46:15 +00:00
Bruce Momjian edb58721b8 Fix pgproc names over 15 chars in output. Add strNcpy() function. remove some (void) casts that are unnecessary. 1997-08-12 20:16:25 +00:00
Marc G. Fournier 4800abc7c1 From: Darren King <aixssd!darrenk@abs.net>
To: pgsql-patches@postgreSQL.org
Subject: [PATCHES] DROP AGGREGATE gram.y typo...


Somehow I dropped a comma in the gram.y part (line 129) of my
patch for drop aggregate.  Here's a correct patch for gram.y.

PS. I hope I got the right comma, manually applied :) (scrappy)
1997-05-22 00:24:07 +00:00
Marc G. Fournier 5e7c0a0b9a From: Darren King <aixssd!darrenk@abs.net>
Subject: [PATCHES] DROP AGGREGATE patch/fix.


Here's a patch that fixes the DROP AGGREGATE command to delete
the desired aggregate for a specific type.
1997-05-22 00:17:24 +00:00
Vadim B. Mikheev 24d48db32d 1. SHOW/RESET var fixed.
2. New VACUUM syntax (ANALYZE ...).
1997-04-23 06:04:46 +00:00
Marc G. Fournier 4b5319129c To: Thomas Lockhart <Thomas.G.Lockhart@jpl.nasa.gov>
Subject: Re: [PATCHES] SET DateStyle patches

On Tue, 22 Apr 1997, Thomas Lockhart wrote:

> Some more patches! These (try to) finish implementing SET variable TO value
> for "DateStyle" (changed the name from simply "date" to be more descriptive).
> This is based on code from Martin and Bruce (?), which was easy to modify.
> The syntax is
>
> SET DateStyle TO 'iso'
> SET DateStyle TO 'postgres'
> SET DateStyle TO 'sql'
> SET DateStyle TO 'european'
> SET DateStyle TO 'noneuropean'
> SET DateStyle TO 'us'         (same as "noneuropean")
> SET DateStyle TO 'default'    (current same as "postgres,us")
>
> ("european" is just compared for the first 4 characters, and "noneuropean"
> is compared for the first 7 to allow less typing).
>
> Multiple arguments are allowed, so SET datestyle TO 'sql,euro' is valid.
>
> My mods also try to implement "SHOW variable" and "RESET variable", but
> that part just core dumps at the moment. I would guess that my errors
> are obvious to someone who knows what they are doing with the parser stuff,
> so if someone (Bruce and/or Martin??) could have it do the right thing
> we will have a more complete set of what we need.
>
> Also, I would like to have a floating point precision global variable to
> implement "SET precision TO 10" and perhaps "SET precision TO 10,2" for
> float8 and float4, but I don't know how to do that for integer types rather
> than strings. If someone is fixing the SHOW and RESET code, perhaps they can
> add some hooks for me to do the floats while they are at it.
>
> I've left some remnants of variable structures in the source code which
> I did not use in the interests of getting something working for v6.1.
> We'll have time to clean things up for the next release...
1997-04-23 03:18:27 +00:00
Vadim B. Mikheev 803a2b13f2 Fix for 'SET var_name TO var_value': var_name already defined. 1997-04-05 06:25:59 +00:00
Marc G. Fournier a51df14a69 From: "Martin J. Laubach" <mjl@CSlab.tuwien.ac.at>
Subject: [HACKERS] Patch: SET var TO 'val'

  Here is a patch that adds a "SET variable TO 'somevalue'" capability
to the parser, and then calls the SetPGVariable() function (which does
just issue a elog(NOTICE) to see whether it works).

  That's the framework for adding timezone/date format/language/...
stuff.
1997-04-02 18:24:52 +00:00
Vadim B. Mikheev 9729f6ca0d CREATE/DROP SEQUENCE ...
Check nextval/currval permission in analyze.c.
1997-04-02 04:01:03 +00:00
Vadim B. Mikheev 7d336625c0 Added syntax for multi-column indices. 1997-03-26 02:52:49 +00:00
Bruce Momjian cf2403896d Only allow NULL in the prpoer places. 1997-02-13 15:40:03 +00:00
Bruce Momjian 3a02ccfa1d Change EXPLAIN options to just use VERBOSE. 1997-01-16 14:56:59 +00:00
Bruce Momjian 0d3bf78e0b Added VERBOSE option to vacuum command. 1997-01-13 03:45:33 +00:00
Bruce Momjian 4371756f16 Improve handling of semicolons ending statements. 1996-12-20 20:33:12 +00:00
Bruce Momjian db7a90f1d9 Make GROUP BY work with aliases, ORDER BY with column numbers 1996-12-17 01:53:43 +00:00
Bruce Momjian 7af262d2a7 Require seimcolons between statements. 1996-12-11 22:55:53 +00:00
Bruce Momjian 2d7aacb052 Added BETWEEN and IN to grammar. Map != to <>. 1996-11-30 03:38:09 +00:00
Bruce Momjian a3d773a693 Allow select oid,* from table. Allow * anywhere in target list. 1996-11-29 15:56:18 +00:00
Bruce Momjian ba876c150a Changed saved_relname size to save memory. 1996-11-28 05:46:08 +00:00
Bruce Momjian 58802bf39a Can't add a keyword without making it a keyword. :-)
D'Arcy J.M. Cain                           |  Democracy is three wolves
1996-11-20 22:58:22 +00:00
Marc G. Fournier 07a65b2255 Commit of a *MAJOR* patch from Dan McGuirk <djm@indirect.com>
Changes:

        * Unique index capability works using the syntax 'create unique
          index'.

        * Duplicate OID's in the system tables are removed.  I put
          little scripts called 'duplicate_oids' and 'find_oid' in
          include/catalog that help to find and remove duplicate OID's.
          I also moved 'unused_oids' from backend/catalog to
          include/catalog, since it has to be in the same directory
          as the include files in order to work.

        * The backend tries converting the name of a function or aggregate
          to all lowercase if the original name given doesn't work (mostly
          for compatibility with ODBC).

        * You can 'SELECT NULL' to your heart's content.

        * I put my _bt_updateitem fix in instead, which uses
          _bt_insertonpg so that even if the new key is so big that
          the page has to be split, everything still works.

        * All literal references to system catalog OID's have been
          replaced with references to define'd constants from the catalog
          header files.

        * I added a couple of node copy functions.  I think this was a
          preliminary attempt to get rules to work.
1996-11-13 20:56:15 +00:00
Marc G. Fournier 2bdded3540 Various cleanups from D'Arcy 1996-11-11 12:14:45 +00:00
Bruce Momjian c9c0e111b8 More compile cleanups 1996-11-08 20:46:33 +00:00
Bruce Momjian f59a46a8c8 Parser Overhaul 1996-10-30 02:02:41 +00:00
Marc G. Fournier 1a003fbcc2 Various patches from Bryan that *should* clean up the compile problems
ppl are seeing with v2.0
1996-09-20 08:34:39 +00:00
Marc G. Fournier 4978d3f4bb modifications required to reflect centralized include files 1996-08-28 22:50:24 +00:00
Marc G. Fournier 2fd6061e1c Quick fix of the PG-GiST import pointed out by Dan 1996-08-26 19:59:15 +00:00
Marc G. Fournier a2740a455f There, now we support GiST...now what? :) 1996-08-26 06:32:06 +00:00
Marc G. Fournier 208a30f23d The patch does several things:
It adds a WITH OIDS option to the copy command, which allows
dumping and loading of oids.

        If a copy command tried to load in an oid that is greater than
its current system max oid, the system max oid is incremented.  No
checking is done to see if other backends are running and have cached
oids.

        pg_dump as its first step when using the -o (oid) option, will
copy in a dummy row to set the system max oid value so as rows are
loaded in, they are certain to be lower than the system oid.

        pg_dump now creates indexes at the end to speed loading


Submitted by:  Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-24 20:49:41 +00:00
Marc G. Fournier a4402ecc8c Fixes a bug in 'create index'
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-15 07:42:52 +00:00
Marc G. Fournier 59f29714aa Fixes:
This patch forces postgres95 to assume any floating-point value is a
float8.  It removes the requirement that you cast all floating-point
constants to float8.

We can remove alot of casts in the regression test after we are sure
this works.

If I have missed anything, would someone let me know.  I have tested
inserts of floating-point values into float8 fields, and it worked well.
Casting the number to float4 showed the same precision loss as previous
uncast values showed.

Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
1996-08-13 01:29:34 +00:00
Marc G. Fournier bb0bdfd101 Fixes:
I've enclosed two patches.  The first affects Solaris compilability.  The
bug stems from netdb.h (where MAXHOSTNAMELEN is defined on a stock
system).  If the user has installed the header files from BIND 4.9.x,
there will be no definition of MAXHOSTNAMELEN.  The patch will, if all
else fails, try to include <arpa/nameser.h> and set MAXHOSTNAMELEN to
MAXDNAME, which is 256 (just like MAXHOSTNAMELEN on a stock system).

The second patch adds aliases for "ISNULL" to "IS NULL" and likewise for
"NOTNULL" to "IS NOT NULL".  I have not removed the postgres specific
ISNULL and NOTNULL.  I noticed this on the TODO list, and figured it would
be easy to remove.

The full semantics are:
        [ expression IS NULL ]
        [ expression IS NOT NULL ]

--Jason


Submitted by: Jason Wright <jason@oozoo.vnet.net>
1996-08-06 16:43:41 +00:00
Marc G. Fournier 6c684b1847 Fixes:
Previously Postgres95 wouldn't accept 'order by' clauses with fields
referred to as '<table>.<field>', e.g.:

        select t1.field1, t2.field2 from table1 t1, table2 t2
                order by t2.field2;

This syntax is required by the ODBC SQL spec.

Submitted by: Dan McGuirk <mcguirk@indirect.com>
1996-08-06 16:38:03 +00:00
Marc G. Fournier ab22b34891 Fixes:
While a normal SELECT statement can contain a GROUP BY clause, a cursor
declaration cannot. This was not the case in PG-1.0. Was there a good
reason why this was changed? Are cursors being phased out? Is there any way
to get data with just a SELECT (and without a DECLARE CURSOR ...)?

The patch below seems to fix things. If anyone can see a problem with it,
please let me know. Thanks.

Submitted by:  David Smith <dasmith@perseus.tufts.edu>
1996-08-06 16:27:59 +00:00
Marc G. Fournier 7344d69898 Finished merging in src/backend from Dr. George's source tree 1996-07-23 02:23:54 +00:00
Marc G. Fournier d31084e9d1 Postgres95 1.01 Distribution - Virgin Sources 1996-07-09 06:22:35 +00:00