aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeodor Sigaev <teodor@sigaev.ru>2007-09-11 08:51:22 +0000
committerTeodor Sigaev <teodor@sigaev.ru>2007-09-11 08:51:22 +0000
commitc4b2b2960aad6fc292dfaec330ebe41fead8ab30 (patch)
tree9382c438a252a0ecda24f83e08b627561b025bf3
parent57cafe79823dcd3653cf5e19cbdf58300cb1576c (diff)
downloadpostgresql-c4b2b2960aad6fc292dfaec330ebe41fead8ab30.tar.gz
postgresql-c4b2b2960aad6fc292dfaec330ebe41fead8ab30.zip
Fix ts_debug function to prevent unneeded calls of ts_lexize().
It will be mush better to reimplement ts_debug in C (instead of SQL as now), but it's planned for the future.
-rw-r--r--src/backend/catalog/system_views.sql5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 7540c7e7a55..e4ae0f39d4e 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -3,7 +3,7 @@
*
* Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.43 2007/09/11 03:28:05 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.44 2007/09/11 08:51:22 teodor Exp $
*/
CREATE VIEW pg_roles AS
@@ -415,8 +415,7 @@ SELECT
( SELECT mapdict, pg_catalog.ts_lexize(mapdict, parse.token) AS lex
FROM pg_catalog.pg_ts_config_map AS m
WHERE m.mapcfg = $1 AND m.maptokentype = parse.tokid
- ORDER BY m.mapseqno ) dl
- WHERE dl.lex IS NOT NULL
+ ORDER BY pg_catalog.ts_lexize(mapdict, parse.token) IS NULL, m.mapseqno ) dl
LIMIT 1
) AS "Lexized token"
FROM pg_catalog.ts_parse(