Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 29f3cd9

Browse files
committed
Do not add GUCs for non-transactional statements
1 parent 93239d1 commit 29f3cd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/postmaster/proxy.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,10 @@ channel_read(Channel* chan)
691691
}
692692
else
693693
{
694-
chan->gucs = psprintf("%sset local%s%c", chan->prev_gucs, stmt+3,
694+
char* param = stmt + 3;
695+
if (pg_strncasecmp(param, " session", 8) == 0)
696+
param += 8;
697+
chan->gucs = psprintf("%sset local%s%c", chan->prev_gucs, param,
695698
chan->buf[chan->rx_pos-2] == ';' ? ' ' : ';');
696699
}
697700
new_msg = chan->gucs + strlen(chan->prev_gucs);

0 commit comments

Comments
 (0)