Thread: First experiences with Postgresql 7.0
============================================================================ POSTGRESQL BUG REPORT TEMPLATE ============================================================================ Your name : Rolf Grossmann Your email address : grossman@securitas.net System Configuration --------------------- Architecture (example: Intel Pentium) : AMD-K6 300 Operating System (example: Linux 2.0.26 ELF) : FreeBSD 3.4-STABLE PostgreSQL version (example: PostgreSQL-6.5.1): PostgreSQL-7.0beta1 Compiler used (example: gcc 2.8.0) : gcc 2.95 Please enter a FULL description of your problem: ------------------------------------------------ First I'd like to say that I'm really impressed with the quality of this first beta release. Still, when I was trying to set up my old database, I ran into a bit of a problem: I couldn't specify NOT NULL PRIMARY KEY anymore. Removing the NOT NULL part solves the problem (and it's implied by PRIMARY KEY anyway), however all major databases allow that syntax (and upto the last release Postgresql did too), so I'd like to see it added back. Please describe a way to repeat the problem. Please try to provide a concise reproducible example, if at all possible: ---------------------------------------------------------------------- Try to create this table: CREATE TABLE Notes ( Id INT NOT NULL PRIMARY KEY, Text VARCHAR(1024) NOT NULL ); Please enter a FULL description of your problem: ------------------------------------------------ There is another problem with the regression tests: If the user running the tests has a .psqlrc file all regression tests fail, because commands from that file are echoed to the result file. Additionally, it a transaction is started from that file, regression tests fail, because they include tests for error cases and a transaction needs to be aborted after an error. A possible solution would probably be to add a flag to psql that inhibits reading the .psqlrc file and using that flag with the regression tests. On a related note (not a bug of course ;))... would it be possible to add some option to psql (or even libpq?) to always keep a transaction active? Bye, Rolf
Rolf Grossmann <grossman@securitas.net> writes: > I ran into a bit of a problem: I couldn't specify NOT NULL PRIMARY KEY > anymore. For the moment try the other order: PRIMARY KEY NOT NULL. This is a known parser deficiency that we chose to leave unfixed for the start of beta, but it should be fixed for 7.0 ... regards, tom lane
Hi, on Wed, 23 Feb 2000 11:56:02 -0500 Tom Lane wrote concerning "Re: [BUGS] First experiences with Postgresql 7.0 " something like this: > Rolf Grossmann <grossman@securitas.net> writes: >> I ran into a bit of a problem: I couldn't specify NOT NULL PRIMARY KEY >> anymore. > For the moment try the other order: PRIMARY KEY NOT NULL. That doesn't work either. > This is a > known parser deficiency that we chose to leave unfixed for the start of > beta, but it should be fixed for 7.0 ... That's good to hear. Thanks, Rolf
> There is another problem with the regression tests: If the user running the > tests has a .psqlrc file all regression tests fail, because commands from > that file are echoed to the result file. Additionally, it a transaction > is started from that file, regression tests fail, because they include tests > for error cases and a transaction needs to be aborted after an error. Incidentally, this should also be the behaviour of the old psql, so it shouldn't be all that surprising. Will be fixed of course, though. > On a related note (not a bug of course ;))... would it be possible to add > some option to psql (or even libpq?) to always keep a transaction active? The backend would be the right place for this, and yes, it's possible, but there seems to be some disagreement whether we should do it. -- Peter Eisentraut Sernanders vaeg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
Hi, on Thu, 24 Feb 2000 13:47:36 +0100 (MET) Peter Eisentraut wrote concerning "Re: [BUGS] First experiences with Postgresql 7.0" something like this: > Well, don't I look stupid here. Once upon a time I recall to have fixed > exactly this issue, apparently it snuck back in. > If you run psql in non-interactive mode the psqlrc file shouldn't be read > at all. Unless people want that flag, but I don't like that better. After doing some more experimenting, I noticed that psql does (indeed) not read the psqlrc file when given the -f option. Alas, the regression tests don't use -f but send the file in via stdio. So I think this behaviour is The Right Thing, but the regression tests should be fixed (probably to use -f). Bye, Rolf
On Thu, 24 Feb 2000, Rolf Grossmann wrote: > not read the psqlrc file when given the -f option. Alas, the regression > tests don't use -f but send the file in via stdio. So I think this > behaviour is The Right Thing, but the regression tests should be fixed > (probably to use -f). But the output of "-f" vs "<" differs, in particular "-f" gives you error messages like psql:inputfile:lineno: ERROR: ... and I believe no one wants to fix up the regression tests in that direction, after we already did it once. -- Peter Eisentraut Sernanders vaeg 10:115 peter_e@gmx.net 75262 Uppsala http://yi.org/peter-e/ Sweden
> Hi, > > on Thu, 24 Feb 2000 13:47:36 +0100 (MET) Peter Eisentraut wrote > concerning "Re: [BUGS] First experiences with Postgresql 7.0" something like this: > > > Well, don't I look stupid here. Once upon a time I recall to have fixed > > exactly this issue, apparently it snuck back in. > > > If you run psql in non-interactive mode the psqlrc file shouldn't be read > > at all. Unless people want that flag, but I don't like that better. > > After doing some more experimenting, I noticed that psql does (indeed) > not read the psqlrc file when given the -f option. Alas, the regression > tests don't use -f but send the file in via stdio. So I think this > behaviour is The Right Thing, but the regression tests should be fixed > (probably to use -f). But is it right to not read the psqlrc file with -f? Can psqlrc be read but not displayed with -q. regress.sh uses -a and -q, which seem to conflict with each other. -a Echo all input from script -q Run quietly (no messages, only query output) I will admit regress.sh may be using the wrong flags now. Also, PGLIB is used by createlang. Not sure how it used to work. CREATE DATABASE =============== installing PL/pgSQL... ================= createlang: missing required argument PGLIB directory (This is the directory where the interpreter for the procedural language is stored. Traditionally, these are installed in whatever 'lib' directory was specified at configure time.) createlang failed -- Bruce Momjian | http://www.op.net/~candle pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026