|
From: andrei_mart <and...@us...> - 2010-06-30 19:55:24
|
Project "Postgres-XC".
The branch, master has been updated
via 5d83e22e3cabc3d1e5dc425f492e4459b30a67a0 (commit)
via a1b6404cb6c214e9df075e3d827e8384555c7b44 (commit)
from 49e836ebf1c86211c342f320838611fc48e6fa1f (commit)
- Log -----------------------------------------------------------------
commit 5d83e22e3cabc3d1e5dc425f492e4459b30a67a0
Author: Andrei Martsinchyk <And...@en...>
Date: Wed Jun 30 13:21:11 2010 +0300
Use ereport instead of Assert if sort operation is not defined
This error is likely to happen if expression of non-sortable data
type is in distinct clause
diff --git a/src/backend/pgxc/plan/planner.c b/src/backend/pgxc/plan/planner.c
index 1bbbb75..2cf488c 100644
--- a/src/backend/pgxc/plan/planner.c
+++ b/src/backend/pgxc/plan/planner.c
@@ -1556,7 +1556,11 @@ add_sort_column(AttrNumber colIdx, Oid sortOp, bool nulls_first,
{
int i;
- Assert(OidIsValid(sortOp));
+ if (!OidIsValid(sortOp))
+ ereport(ERROR,
+ (errcode(ERRCODE_UNDEFINED_FUNCTION),
+ errmsg("could not identify an ordering operator")));
+
for (i = 0; i < numCols; i++)
{
commit a1b6404cb6c214e9df075e3d827e8384555c7b44
Author: Andrei Martsinchyk <And...@en...>
Date: Wed Jun 30 13:17:03 2010 +0300
Reverted PANIC ereports back to ERROR
They were changed for debugging purposes and accidently committed
diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c
index 82a7cf8..ae4ed73 100644
--- a/src/backend/utils/mmgr/mcxt.c
+++ b/src/backend/utils/mmgr/mcxt.c
@@ -507,7 +507,7 @@ MemoryContextAlloc(MemoryContext context, Size size)
AssertArg(MemoryContextIsValid(context));
if (!AllocSizeIsValid(size))
- elog(PANIC, "invalid memory alloc request size %lu",
+ elog(ERROR, "invalid memory alloc request size %lu",
(unsigned long) size);
return (*context->methods->alloc) (context, size);
@@ -528,7 +528,7 @@ MemoryContextAllocZero(MemoryContext context, Size size)
AssertArg(MemoryContextIsValid(context));
if (!AllocSizeIsValid(size))
- elog(PANIC, "invalid memory alloc request size %lu",
+ elog(ERROR, "invalid memory alloc request size %lu",
(unsigned long) size);
ret = (*context->methods->alloc) (context, size);
@@ -553,7 +553,7 @@ MemoryContextAllocZeroAligned(MemoryContext context, Size size)
AssertArg(MemoryContextIsValid(context));
if (!AllocSizeIsValid(size))
- elog(PANIC, "invalid memory alloc request size %lu",
+ elog(ERROR, "invalid memory alloc request size %lu",
(unsigned long) size);
ret = (*context->methods->alloc) (context, size);
@@ -617,7 +617,7 @@ repalloc(void *pointer, Size size)
AssertArg(MemoryContextIsValid(header->context));
if (!AllocSizeIsValid(size))
- elog(PANIC, "invalid memory alloc request size %lu",
+ elog(ERROR, "invalid memory alloc request size %lu",
(unsigned long) size);
return (*header->context->methods->realloc) (header->context,
-----------------------------------------------------------------------
Summary of changes:
src/backend/pgxc/plan/planner.c | 6 +++++-
src/backend/utils/mmgr/mcxt.c | 8 ++++----
2 files changed, 9 insertions(+), 5 deletions(-)
hooks/post-receive
--
Postgres-XC
|