mirror of
https://github.com/postgres/postgres.git
synced 2026-05-21 01:37:50 -04:00
This module allows plan advice strings to be provided automatically from an in-memory advice stash. Advice stashes are stored in dynamic shared memory and must be recreated and repopulated after a server restart. If pg_stash_advice.stash_name is set to the name of an advice stash, and if query identifiers are enabled, the query identifier for each query will be looked up in the advice stash and the associated advice string, if any, will be used each time that query is planned. Reviewed-by: Lukas Fittl <lukas@fittl.com> Reviewed-by: Alexandra Wang <alexandra.wang.oss@gmail.com> Reviewed-by: David G. Johnston <david.g.johnston@gmail.com> Reviewed-by: Jakub Wartak <jakub.wartak@enterprisedb.com> Discussion: http://postgr.es/m/CA+TgmoaeNuHXQ60P3ZZqJLrSjP3L1KYokW9kPfGbWDyt+1t=Ng@mail.gmail.com
16 lines
384 B
SQL
16 lines
384 B
SQL
/*
|
|
* This test must be run in a database with UTF-8 encoding,
|
|
* because other encodings don't support all the characters used.
|
|
*/
|
|
|
|
SELECT getdatabaseencoding() <> 'UTF8'
|
|
AS skip_test \gset
|
|
\if :skip_test
|
|
\quit
|
|
\endif
|
|
|
|
SET client_encoding = utf8;
|
|
|
|
-- Non-ASCII stash names should be rejected.
|
|
SELECT pg_create_advice_stash('café');
|
|
SET pg_stash_advice.stash_name = 'café';
|