Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc9dd12

Browse files
committed
Query in SQL function still not schema-safe; add a couple
more pg_catalog. qualifications.
1 parent9872812 commitfc9dd12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/catalog/information_schema.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*
55
* Copyright (c) 2003-2009, PostgreSQL Global Development Group
66
*
7-
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.55 2009/07/0718:23:13 petere Exp $
7+
* $PostgreSQL: pgsql/src/backend/catalog/information_schema.sql,v 1.56 2009/07/0719:28:00 tgl Exp $
88
*/
99

1010
/*
@@ -106,7 +106,8 @@ $$SELECT
106106
CASE WHEN $1IN (25,1042,1043)/* text, char, varchar*/
107107
THEN CASE WHEN $2=-1/* default typmod*/
108108
THEN CAST(2^30ASinteger)
109-
ELSEinformation_schema._pg_char_max_length($1, $2)*pg_catalog.pg_encoding_max_length((SELECT encodingFROM pg_databaseWHERE datname= current_database()))
109+
ELSEinformation_schema._pg_char_max_length($1, $2)*
110+
pg_catalog.pg_encoding_max_length((SELECT encodingFROMpg_catalog.pg_databaseWHERE datname=pg_catalog.current_database()))
110111
END
111112
ELSEnull
112113
END$$;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp