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

Commit65ea4f6

Browse files
committed
Allow vacuum of temporary tables
1 parent6929459 commit65ea4f6

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

‎src/backend/commands/vacuum.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.145 2000/04/0600:29:51 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.146 2000/04/0618:12:07 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -42,6 +42,7 @@
4242
#include"utils/portal.h"
4343
#include"utils/relcache.h"
4444
#include"utils/syscache.h"
45+
#include"utils/temprel.h"
4546

4647
#ifndefHAVE_GETRUSAGE
4748
#include"rusagestub.h"
@@ -315,14 +316,20 @@ vc_getrels(NameData *VacRelP)
315316

316317
if (NameStr(*VacRelP))
317318
{
318-
319319
/*
320320
* we could use the cache here, but it is clearer to use scankeys
321321
* for both vacuum cases, bjm 2000/01/19
322322
*/
323+
char*nontemp_relname;
324+
325+
/* We must re-map temp table names bjm 2000-04-06 */
326+
if ((nontemp_relname=
327+
get_temp_rel_by_username(NameStr(*VacRelP)))==NULL)
328+
nontemp_relname=NameStr(*VacRelP);
329+
323330
ScanKeyEntryInitialize(&key,0x0,Anum_pg_class_relname,
324331
F_NAMEEQ,
325-
PointerGetDatum(NameStr(*VacRelP)));
332+
PointerGetDatum(nontemp_relname));
326333
}
327334
else
328335
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp