Commit c4b2b296 authored by Teodor Sigaev's avatar Teodor Sigaev

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.
parent 57cafe79
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* Copyright (c) 1996-2007, PostgreSQL Global Development Group * 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 CREATE VIEW pg_roles AS
...@@ -415,8 +415,7 @@ SELECT ...@@ -415,8 +415,7 @@ SELECT
( SELECT mapdict, pg_catalog.ts_lexize(mapdict, parse.token) AS lex ( SELECT mapdict, pg_catalog.ts_lexize(mapdict, parse.token) AS lex
FROM pg_catalog.pg_ts_config_map AS m FROM pg_catalog.pg_ts_config_map AS m
WHERE m.mapcfg = $1 AND m.maptokentype = parse.tokid WHERE m.mapcfg = $1 AND m.maptokentype = parse.tokid
ORDER BY m.mapseqno ) dl ORDER BY pg_catalog.ts_lexize(mapdict, parse.token) IS NULL, m.mapseqno ) dl
WHERE dl.lex IS NOT NULL
LIMIT 1 LIMIT 1
) AS "Lexized token" ) AS "Lexized token"
FROM pg_catalog.ts_parse( FROM pg_catalog.ts_parse(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment