index c15181b9dbc7736b8712d220c6b3ba729b5d6ded..2093f1ce8a606876e5dc2f23baf1f0d02cc7a10e 100644 (file)
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.4 2006年08月03日 15:22:09 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.5 2006年09月14日 11:26:49 teodor Exp $
*-------------------------------------------------------------------------
*/
so->keys = (GinScanKey) palloc( scan->numberOfKeys * sizeof(GinScanKeyData) );
+ if (scan->numberOfKeys < 1)
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("GIN indexes do not support whole-index scans")));
+
for(i=0; i<scan->numberOfKeys; i++) {
Datum* entryValues;
uint32 nEntryValues;
so->nkeys = nkeys;
if ( so->nkeys == 0 )
- elog(ERROR, "Gin doesn't support full scan due to it's awful inefficiency");
+ ereport(ERROR,
+ (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
+ errmsg("GIN index doesn't support search with void query")));
pgstat_count_index_scan(&scan->xs_pgstat_info);
}