Commit Graph

6052 Commits

Author SHA1 Message Date
Bruce Momjian 93ca944077 autoconf 1999-12-17 18:19:30 +00:00
Bruce Momjian 9f013a552a Lowercase $host for QNX. 1999-12-17 18:18:26 +00:00
Bruce Momjian 1520f60f0e Remove unused files. 1999-12-17 18:07:17 +00:00
Bruce Momjian 5c99f9cd84 Fix MULTIBYTE handling in string by using strcat. 1999-12-17 18:05:32 +00:00
Jan Wieck 219652d5f7 Okay, this is how it looks: Please apply the attached patch to the current
sources, otherwise this whole things fails anyway (fails to create the
views).

Peter Eisentraut

Manually applied - Jan
1999-12-17 16:53:11 +00:00
Thomas G. Lockhart 97710d9f5a Fix typo in tag. 1999-12-17 14:52:51 +00:00
Thomas G. Lockhart aac9f5bee8 Re-enable makeAttr() if ENABLE_OUTER_JOINS is defined.
Somehow got bracketed with #ifdef NOT_USED instead.
1999-12-17 14:47:35 +00:00
Bruce Momjian 4f73187bb7 ANother initdb cleanup 1999-12-17 03:46:33 +00:00
Bruce Momjian 21992ed10a Reverse out nextval patch. 1999-12-17 01:25:25 +00:00
Bruce Momjian ac00256ceb initdb.sh fix from Peter. 1999-12-17 01:16:03 +00:00
Bruce Momjian 83bad7c063 This is my -- hopefully sufficiently portable -- attempt at cleaning out
initdb. No more obscure dependencies on environment variables or paths.
It
now finds the templates and the right postgres itself (with cmd line
options as fallback). It also no longer depends on $USER (su safe), and
doesn't advertise that --username allows you to install the db as a
different user, since that doesn't work anyway. Also, recovery and
cleanup
on all errors. Consistent options, clearer documentation.

Please take a look at this and adopt it if you feel it's safe enough. I
have simulated all the stupid circumstances I could think of, but you
never know with shell scripts.

Oh yeah, you can give the postgres user a default password now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-17 01:05:31 +00:00
Bruce Momjian 1b22a8cb03 Clear paren level flag on \r or any backslash command, rather than
keeping parenlevel unchanged.
1999-12-16 23:54:41 +00:00
Jan Wieck 397e9b32a3 Some changes to prepare for LONG attributes.
Jan
1999-12-16 22:20:03 +00:00
Bruce Momjian 5ca971a18a Hi,
I sending promised patch with:

        * getopt_long() - for pg_dump (portable)

        * and "Usage: " changes in scripts in src/bin/
          - this changes are cosmetic only, not change any
          feature ...etc.

 All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.

                                                Karel

Karel Zak <zakkr@zf.jcu.cz>              http://home.zf.jcu.cz/~zakkr/
1999-12-16 20:10:02 +00:00
Bruce Momjian cf374febf5 >Turning nextval and currval into keywords is not an acceptable way to
>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-16 20:07:41 +00:00
Bruce Momjian 99b8f84511 Here's the Create/Alter/Drop Group stuff that's been really overdue. I
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-16 17:24:19 +00:00
Bruce Momjian 4cb1fb6f59 Update for QNX. 1999-12-16 16:52:53 +00:00
Bruce Momjian 8d49a6608a autoconf 1999-12-16 16:34:06 +00:00
Michael Meskes 50a5b4ab41 *** empty log message *** 1999-12-16 06:53:12 +00:00
Bruce Momjian d033e17530 Ethernet MAC addresses (macaddr type) are not compared correctly for
equality.  The lobits macro is wrong and extracts the wrong set of
bits out of the structure.

To exhibit the problem:

select '000000:000000'::macaddr = '000000:110000'::macaddr ;
?column?
--------
t
(1 row)

Daniel Boyd
1999-12-16 01:30:49 +00:00
Bruce Momjian 7585deb087 I have done the QNX4 port with the current source tree. The number of
backend/Makefiles to be patched could significantly be reduced since
they
have been adopted to the QNX4 needs.

Andreas Kardos
1999-12-16 01:25:23 +00:00
Bruce Momjian 9805abb0fb This patch solves a couple of memory leaks in ecpglib.c. The patch is
ok for both the
development tree (CVS) and for 6.5.3.

 Stephen Birch
1999-12-14 22:03:48 +00:00
Tom Lane 7431796b46 fix_parsetree_attnums was not nearly smart enough about walking parse
trees.  Also rewrite find_all_inheritors() in a more intelligible style.
1999-12-14 03:35:28 +00:00
Bruce Momjian 549a8ba59a > From what I gather, this should be a little cleaner because the
triggered
> function now returns the right datatype.

Oops, I got crossed up with Jan's improvements. Ignore this.

--
Peter Eisentraut                  Sernanders väg 10:115
peter_e@gmx.net                   75262 Uppsala
1999-12-14 00:17:33 +00:00
Bruce Momjian f5a613c0ed >From what I gather, this should be a little cleaner because the
triggered
function now returns the right datatype.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-14 00:12:06 +00:00
Bruce Momjian bcaabc5698 Depending on my interpreting (and programming) skills, this might solve
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-14 00:08:21 +00:00
Bruce Momjian a82f9ffde6 New LDOUT makefile variable for QNX os. 1999-12-13 22:35:27 +00:00
Tom Lane ff6fe1502d Update documentation to reflect availability of aggregate(DISTINCT).
Try to provide a more lucid discussion in 'Using Aggregate Functions'
tutorial section.
1999-12-13 17:39:38 +00:00
Bruce Momjian 662371cc5d Prevent _deadcode from showing in ctags and mkid 1999-12-13 04:54:01 +00:00
Tom Lane a8ae19ec3d aggregate(DISTINCT ...) works, per SQL spec.
Note this forces initdb because of change of Aggref node in stored rules.
1999-12-13 01:27:21 +00:00
Tom Lane efb36d2be8 any_ordering_op()'s argument should be declared Oid not int. 1999-12-12 20:51:29 +00:00
Bruce Momjian cb00b7faa5 I'm in TODO mood today ...
* Document/trigger/rule so changes to pg_shadow recreate pg_pwd

I did it with a trigger and it seems to work like a charm. The function
that already updates the file for create and alter user has been made a
built-in "SQL" function and a trigger is created at initdb time.

Comments around the pg_pwd updating function seem to be worried about
this
routine being called concurrently, but I really don't see a reason to
worry about this. Verify for yourself. I guess we never had a system
trigger before, so treat this with care, and feel free to adjust the
nomenclature as well.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:57:36 +00:00
Bruce Momjian 11023eb1f5 Meanwhile, database names with single quotes in names don't work very well
at all, and because of shell quoting rules this can't be fixed, so I put
in error messages to that end.

Also, calling create or drop database in a transaction block is not so
good either, because the file system mysteriously refuses to roll back rm
calls on transaction aborts. :) So I put in checks to see if a transaction
is in progress and signal an error.

Also I put the whole call in a transaction of its own to be able to roll
back changes to pg_database in case the file system operations fail.

The alternative location issues I posted recently were untouched, awaiting
the outcome of that discussion. Other than that, this should be much more
fool-proof now.

The docs I cleaned up as well.

Peter Eisentraut                  Sernanders väg 10:115
1999-12-12 05:15:10 +00:00
Bruce Momjian 1ff0a475ee Fix for psql from Peter. 1999-12-11 21:35:49 +00:00
Bruce Momjian 298845a6f0 Allow ; in () in psql. 1999-12-11 01:03:36 +00:00
Bruce Momjian e6ac08c398 Update TODO list. 1999-12-11 00:31:37 +00:00
Bruce Momjian e639a1a6a8 This takes care of TODO item
* pg_dump should preserve primary key information

Also a couple of warnings removed.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-11 00:31:05 +00:00
Bruce Momjian 3c75d64f40 Remove old file. 1999-12-10 17:46:41 +00:00
Bruce Momjian c91e5a4465 Update drop.sql 1999-12-10 17:32:57 +00:00
Bruce Momjian c613e69f40 Rename destroy.sql to drop.sql. 1999-12-10 17:31:30 +00:00
Jan Wieck 62c42a05a2 Added global variable to have RI triggers override
time qualification of HeapTupleSatisfiesSnapshot()

Jan
1999-12-10 12:34:15 +00:00
Tatsuo Ishii d31ff14ed8 Fix memory overrun while setting ps status 1999-12-10 10:29:01 +00:00
Tom Lane 18c3000286 Teach grammar and parser about aggregate(DISTINCT ...). No implementation
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-10 07:37:35 +00:00
Bruce Momjian ecba5d308c Remove unneeded action. 1999-12-10 05:17:13 +00:00
Bruce Momjian cae01cd836 Fix LDREL. 1999-12-10 05:00:36 +00:00
Bruce Momjian 77a4729936 This should fix the \e (\p, \g, ...) behaviour on an empty query buffer.
Also, minor tweakage of tab completion, and I hope the output is flushed
on time now.

--
Peter Eisentraut                  Sernanders väg 10:115
1999-12-10 03:59:30 +00:00
Bruce Momjian 97dec77fab Rename several destroy* functions/tags to drop*. 1999-12-10 03:56:14 +00:00
Tom Lane f6baabcd0b Correct coredump in ALTER TABLE foo ADD(). Accept explicit NULL in
typecasts, eg 'NULL::text'.  Later parts of the parser don't like this
yet, but I'll work on that next.
1999-12-10 03:01:05 +00:00
Bruce Momjian f4db5c3c88 Update regression for new dropdb command. 1999-12-10 00:48:32 +00:00
Jan Wieck a27542c3a8 Added a fflush(stdout) to the \p command required for the
multisession test tool.

Jan
1999-12-10 00:26:35 +00:00