Fixes:
I found another bug in btree index. Looking at the code it seems that NULL
keys are never used to build or scan a btree index (see the explain commands
in the example). However this is not the case when a null key is retrieved
in an outer loop of a join select and used in an index scan of an inner loop.
This bug causes at least three kinds of problems:
1) the backend crashes when it tries to compare a text string with a null.
2) it is not possible to find tuples with null keys in a join.
3) null is considered equal to 0 when the datum is passed by value, see
the last query.
# If your OS requires these libraries, they should be put in
# Makefile.custom with a line similar to:
# X11_LIB+= -lsocket -lnsl
Actually, those should probably go into the ports/Makefile.inc's, but...
It's bug in nodeAgg.c on lines 241, 242:
null_array = malloc(nagg);
for (i=0;i<nagg;i++)
null_array[i] = 'n';
oneTuple = heap_formtuple(tupType, tupValue, null_array);
- your query has not only aggregates but also 'group by-ed' fields and so
null_array should contain tupType->natts elements (tupType->natts > nagg in
your case).
Patch follows and it's very simple.
VAdim
"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 ]
Submitted by: Jason Wright <jason@oozoo.vnet.net>
correct way to do this. Theoretically you could have a NULL
pointer that isn't represented internally as all 0 bits. This
guarantees that it convert correctly.
Submitted by: darcy@druid.com (D'Arcy J.M. Cain)
comment, so here is the comment for the other patch *grin*
> > You are right. I checked the gramar and saw the ability to use the
> > parameter. I looked at the manual pages, and saw no reference to it. I
> > tried running it, and found vacuum does nothing when you give it a table
> > name.
> >
> > I checked a debug version of postgres, and the table name is passed to
> > vacuum() in the variable (char *vacrel). The problem is that the vacuum
> > spans transactions, and the vacrel name gets changed to '<vacuum>',
> > which is the name of the portal that gets created in
> > vacuum.c::_vc_vacuum(). vacuum.c::_vc_init() does a
> > CommitTransactionCommand() which frees the memory allocated to vacrel.
> >
> > Should I change vacuum.c to copy the relation name to a local string
> > variable of vacuum(), or do you recommend we allocate the table name in
> > a different fashion? You are the man who knows the most about this.
>
> static NameData VacRel;
Done. Attached is the patch. I have already applied it to the 2.0
tree. (Marc!)
I tested it and it works. I also applied documentation patches to go
with it.
So now vacuum can be run for only one table if you wish.
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
pg_class
> by overwriting existing tuple for vacrel, so there are no many reasons to
vacuum pg_class).
>
> It can be done somewhere in _vc_getrels - near to checks against archive
relations
> and relations on the write-once storage managers...
>
> Excuse me - I forgot to say about this.
>
Attached is the recently posted fix for this. Thanks.
Submitted by: Bruce Momjian <maillist@candle.pha.pa.us>
my postmaster 1.07.
It's really simple, the loop dealing with all sockets
can't handle more than one ready socket :-)
A simple logic error dealing with lists.
OR IS THERE ANY REASON FOR SETTING curr TO 0?
Submitted by: Carsten Heyl <Heyl@nads.de>
--- src/backend/storage/file/fd.c Thu Sep 12 17:23:38 1996
***************
*** 262,268 ****
Delete(file);
/* save the seek position */
! fileP->seekPos = lseek(fileP->fd, 0L, SEEK_CUR);
Assert( fileP->seekPos != -1);
/* if we have written to the file, sync it */
--- 262,268 ----
Delete(file);
/* save the seek position */
! fileP->seekPos = (long) lseek(fileP->fd, 0L, SEEK_CUR);
Assert( fileP->seekPos != -1);
/* if we have written to the file, sync it */
Submitted by: Randy Terbush <randy@zyzzyva.com>
backend/obj instead of into backend
there is probably a better fix for this, but looking at the Makefile.inc,
I can't find a reason *why* it isn't putting them into obj...
directory. The code that looks for the pg_hba file doesn't use it, though,
so the postmaster uses the wrong pg_hba file. Also, when the postmaster
looks in one directory and the user thinks it is looking in another
directory, the error messages don't give enough information to solve the
problem. I extended the error message for this.
Submitted by: Bryan
|conditions are always met. The patch can be applied to any version
|of Postgres95 from 1.02 to 1.05. After applying the patch, queries
|using indices on bpchar and varchar fields should (hopefully ;-) )
|always return the same tuple set regardless to the fact whether
|indices are used or not.
|
Submitted by: Gerhard Reithofer <tbr_laa@AON.AT>