File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 88 * Portions Copyright (c) 1994, Regents of the University of California
99 *
1010 * IDENTIFICATION
11- * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.4 2006/08/03 15:22:09 tgl Exp $
11+ * $PostgreSQL: pgsql/src/backend/access/gin/ginscan.c,v 1.5 2006/09/14 11:26:49 teodor Exp $
1212 *-------------------------------------------------------------------------
1313 */
1414
@@ -127,6 +127,11 @@ newScanKey( IndexScanDesc scan ) {
127127
128128 so -> keys = (GinScanKey ) palloc ( scan -> numberOfKeys * sizeof (GinScanKeyData ) );
129129
130+ if (scan -> numberOfKeys < 1 )
131+ ereport (ERROR ,
132+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
133+ errmsg ("GIN indexes do not support whole-index scans" )));
134+
130135 for (i = 0 ; i < scan -> numberOfKeys ; i ++ ) {
131136 Datum * entryValues ;
132137 uint32 nEntryValues ;
@@ -155,7 +160,9 @@ newScanKey( IndexScanDesc scan ) {
155160 so -> nkeys = nkeys ;
156161
157162 if ( so -> nkeys == 0 )
158- elog (ERROR , "Gin doesn't support full scan due to it's awful inefficiency" );
163+ ereport (ERROR ,
164+ (errcode (ERRCODE_FEATURE_NOT_SUPPORTED ),
165+ errmsg ("GIN index doesn't support search with void query" )));
159166
160167 pgstat_count_index_scan (& scan -> xs_pgstat_info );
161168}
You can’t perform that action at this time.
0 commit comments