Another pgindent run with updated typedefs.
This commit is contained in:
parent
0e2b12bd96
commit
46785776c4
|
@ -23,7 +23,7 @@ struct SN_env
|
||||||
int S_size;
|
int S_size;
|
||||||
int I_size;
|
int I_size;
|
||||||
int B_size;
|
int B_size;
|
||||||
symbol **S;
|
symbol **S;
|
||||||
int *I;
|
int *I;
|
||||||
symbol *B;
|
symbol *B;
|
||||||
};
|
};
|
||||||
|
|
|
@ -27,7 +27,7 @@ static symbol s_0_0[5] = {'g', 'e', 'n', 'e', 'r'};
|
||||||
|
|
||||||
static struct among a_0[1] =
|
static struct among a_0[1] =
|
||||||
{
|
{
|
||||||
/* 0 */ {5, s_0_0, -1, -1, 0}
|
/* 0 */ {5, s_0_0, -1, -1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_1_0[3] = {'i', 'e', 'd'};
|
static symbol s_1_0[3] = {'i', 'e', 'd'};
|
||||||
|
@ -39,12 +39,12 @@ static symbol s_1_5[2] = {'u', 's'};
|
||||||
|
|
||||||
static struct among a_1[6] =
|
static struct among a_1[6] =
|
||||||
{
|
{
|
||||||
/* 0 */ {3, s_1_0, -1, 2, 0},
|
/* 0 */ {3, s_1_0, -1, 2, 0},
|
||||||
/* 1 */ {1, s_1_1, -1, 3, 0},
|
/* 1 */ {1, s_1_1, -1, 3, 0},
|
||||||
/* 2 */ {3, s_1_2, 1, 2, 0},
|
/* 2 */ {3, s_1_2, 1, 2, 0},
|
||||||
/* 3 */ {4, s_1_3, 1, 1, 0},
|
/* 3 */ {4, s_1_3, 1, 1, 0},
|
||||||
/* 4 */ {2, s_1_4, 1, -1, 0},
|
/* 4 */ {2, s_1_4, 1, -1, 0},
|
||||||
/* 5 */ {2, s_1_5, 1, -1, 0}
|
/* 5 */ {2, s_1_5, 1, -1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_2_1[2] = {'b', 'b'};
|
static symbol s_2_1[2] = {'b', 'b'};
|
||||||
|
@ -62,16 +62,16 @@ static symbol s_2_12[2] = {'i', 'z'};
|
||||||
|
|
||||||
static struct among a_2[13] =
|
static struct among a_2[13] =
|
||||||
{
|
{
|
||||||
/* 0 */ {0, 0, -1, 3, 0},
|
/* 0 */ {0, 0, -1, 3, 0},
|
||||||
/* 1 */ {2, s_2_1, 0, 2, 0},
|
/* 1 */ {2, s_2_1, 0, 2, 0},
|
||||||
/* 2 */ {2, s_2_2, 0, 2, 0},
|
/* 2 */ {2, s_2_2, 0, 2, 0},
|
||||||
/* 3 */ {2, s_2_3, 0, 2, 0},
|
/* 3 */ {2, s_2_3, 0, 2, 0},
|
||||||
/* 4 */ {2, s_2_4, 0, 2, 0},
|
/* 4 */ {2, s_2_4, 0, 2, 0},
|
||||||
/* 5 */ {2, s_2_5, 0, 1, 0},
|
/* 5 */ {2, s_2_5, 0, 1, 0},
|
||||||
/* 6 */ {2, s_2_6, 0, 2, 0},
|
/* 6 */ {2, s_2_6, 0, 2, 0},
|
||||||
/* 7 */ {2, s_2_7, 0, 2, 0},
|
/* 7 */ {2, s_2_7, 0, 2, 0},
|
||||||
/* 8 */ {2, s_2_8, 0, 2, 0},
|
/* 8 */ {2, s_2_8, 0, 2, 0},
|
||||||
/* 9 */ {2, s_2_9, 0, 2, 0},
|
/* 9 */ {2, s_2_9, 0, 2, 0},
|
||||||
/* 10 */ {2, s_2_10, 0, 1, 0},
|
/* 10 */ {2, s_2_10, 0, 1, 0},
|
||||||
/* 11 */ {2, s_2_11, 0, 2, 0},
|
/* 11 */ {2, s_2_11, 0, 2, 0},
|
||||||
/* 12 */ {2, s_2_12, 0, 1, 0}
|
/* 12 */ {2, s_2_12, 0, 1, 0}
|
||||||
|
@ -86,12 +86,12 @@ static symbol s_3_5[5] = {'i', 'n', 'g', 'l', 'y'};
|
||||||
|
|
||||||
static struct among a_3[6] =
|
static struct among a_3[6] =
|
||||||
{
|
{
|
||||||
/* 0 */ {2, s_3_0, -1, 2, 0},
|
/* 0 */ {2, s_3_0, -1, 2, 0},
|
||||||
/* 1 */ {3, s_3_1, 0, 1, 0},
|
/* 1 */ {3, s_3_1, 0, 1, 0},
|
||||||
/* 2 */ {3, s_3_2, -1, 2, 0},
|
/* 2 */ {3, s_3_2, -1, 2, 0},
|
||||||
/* 3 */ {4, s_3_3, -1, 2, 0},
|
/* 3 */ {4, s_3_3, -1, 2, 0},
|
||||||
/* 4 */ {5, s_3_4, 3, 1, 0},
|
/* 4 */ {5, s_3_4, 3, 1, 0},
|
||||||
/* 5 */ {5, s_3_5, -1, 2, 0}
|
/* 5 */ {5, s_3_5, -1, 2, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_4_0[4] = {'a', 'n', 'c', 'i'};
|
static symbol s_4_0[4] = {'a', 'n', 'c', 'i'};
|
||||||
|
@ -121,16 +121,16 @@ static symbol s_4_23[7] = {'o', 'u', 's', 'n', 'e', 's', 's'};
|
||||||
|
|
||||||
static struct among a_4[24] =
|
static struct among a_4[24] =
|
||||||
{
|
{
|
||||||
/* 0 */ {4, s_4_0, -1, 3, 0},
|
/* 0 */ {4, s_4_0, -1, 3, 0},
|
||||||
/* 1 */ {4, s_4_1, -1, 2, 0},
|
/* 1 */ {4, s_4_1, -1, 2, 0},
|
||||||
/* 2 */ {3, s_4_2, -1, 13, 0},
|
/* 2 */ {3, s_4_2, -1, 13, 0},
|
||||||
/* 3 */ {2, s_4_3, -1, 16, 0},
|
/* 3 */ {2, s_4_3, -1, 16, 0},
|
||||||
/* 4 */ {3, s_4_4, 3, 12, 0},
|
/* 4 */ {3, s_4_4, 3, 12, 0},
|
||||||
/* 5 */ {4, s_4_5, 4, 4, 0},
|
/* 5 */ {4, s_4_5, 4, 4, 0},
|
||||||
/* 6 */ {4, s_4_6, 3, 8, 0},
|
/* 6 */ {4, s_4_6, 3, 8, 0},
|
||||||
/* 7 */ {5, s_4_7, 3, 14, 0},
|
/* 7 */ {5, s_4_7, 3, 14, 0},
|
||||||
/* 8 */ {6, s_4_8, 3, 15, 0},
|
/* 8 */ {6, s_4_8, 3, 15, 0},
|
||||||
/* 9 */ {5, s_4_9, 3, 10, 0},
|
/* 9 */ {5, s_4_9, 3, 10, 0},
|
||||||
/* 10 */ {5, s_4_10, 3, 5, 0},
|
/* 10 */ {5, s_4_10, 3, 5, 0},
|
||||||
/* 11 */ {5, s_4_11, -1, 8, 0},
|
/* 11 */ {5, s_4_11, -1, 8, 0},
|
||||||
/* 12 */ {6, s_4_12, -1, 12, 0},
|
/* 12 */ {6, s_4_12, -1, 12, 0},
|
||||||
|
@ -159,15 +159,15 @@ static symbol s_5_8[4] = {'n', 'e', 's', 's'};
|
||||||
|
|
||||||
static struct among a_5[9] =
|
static struct among a_5[9] =
|
||||||
{
|
{
|
||||||
/* 0 */ {5, s_5_0, -1, 4, 0},
|
/* 0 */ {5, s_5_0, -1, 4, 0},
|
||||||
/* 1 */ {5, s_5_1, -1, 6, 0},
|
/* 1 */ {5, s_5_1, -1, 6, 0},
|
||||||
/* 2 */ {5, s_5_2, -1, 3, 0},
|
/* 2 */ {5, s_5_2, -1, 3, 0},
|
||||||
/* 3 */ {5, s_5_3, -1, 4, 0},
|
/* 3 */ {5, s_5_3, -1, 4, 0},
|
||||||
/* 4 */ {4, s_5_4, -1, 4, 0},
|
/* 4 */ {4, s_5_4, -1, 4, 0},
|
||||||
/* 5 */ {6, s_5_5, -1, 1, 0},
|
/* 5 */ {6, s_5_5, -1, 1, 0},
|
||||||
/* 6 */ {7, s_5_6, 5, 2, 0},
|
/* 6 */ {7, s_5_6, 5, 2, 0},
|
||||||
/* 7 */ {3, s_5_7, -1, 5, 0},
|
/* 7 */ {3, s_5_7, -1, 5, 0},
|
||||||
/* 8 */ {4, s_5_8, -1, 5, 0}
|
/* 8 */ {4, s_5_8, -1, 5, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_6_0[2] = {'i', 'c'};
|
static symbol s_6_0[2] = {'i', 'c'};
|
||||||
|
@ -191,16 +191,16 @@ static symbol s_6_17[5] = {'e', 'm', 'e', 'n', 't'};
|
||||||
|
|
||||||
static struct among a_6[18] =
|
static struct among a_6[18] =
|
||||||
{
|
{
|
||||||
/* 0 */ {2, s_6_0, -1, 1, 0},
|
/* 0 */ {2, s_6_0, -1, 1, 0},
|
||||||
/* 1 */ {4, s_6_1, -1, 1, 0},
|
/* 1 */ {4, s_6_1, -1, 1, 0},
|
||||||
/* 2 */ {4, s_6_2, -1, 1, 0},
|
/* 2 */ {4, s_6_2, -1, 1, 0},
|
||||||
/* 3 */ {4, s_6_3, -1, 1, 0},
|
/* 3 */ {4, s_6_3, -1, 1, 0},
|
||||||
/* 4 */ {4, s_6_4, -1, 1, 0},
|
/* 4 */ {4, s_6_4, -1, 1, 0},
|
||||||
/* 5 */ {3, s_6_5, -1, 1, 0},
|
/* 5 */ {3, s_6_5, -1, 1, 0},
|
||||||
/* 6 */ {3, s_6_6, -1, 1, 0},
|
/* 6 */ {3, s_6_6, -1, 1, 0},
|
||||||
/* 7 */ {3, s_6_7, -1, 1, 0},
|
/* 7 */ {3, s_6_7, -1, 1, 0},
|
||||||
/* 8 */ {3, s_6_8, -1, 1, 0},
|
/* 8 */ {3, s_6_8, -1, 1, 0},
|
||||||
/* 9 */ {2, s_6_9, -1, 1, 0},
|
/* 9 */ {2, s_6_9, -1, 1, 0},
|
||||||
/* 10 */ {3, s_6_10, -1, 1, 0},
|
/* 10 */ {3, s_6_10, -1, 1, 0},
|
||||||
/* 11 */ {3, s_6_11, -1, 2, 0},
|
/* 11 */ {3, s_6_11, -1, 2, 0},
|
||||||
/* 12 */ {2, s_6_12, -1, 1, 0},
|
/* 12 */ {2, s_6_12, -1, 1, 0},
|
||||||
|
@ -216,8 +216,8 @@ static symbol s_7_1[1] = {'l'};
|
||||||
|
|
||||||
static struct among a_7[2] =
|
static struct among a_7[2] =
|
||||||
{
|
{
|
||||||
/* 0 */ {1, s_7_0, -1, 1, 0},
|
/* 0 */ {1, s_7_0, -1, 1, 0},
|
||||||
/* 1 */ {1, s_7_1, -1, 2, 0}
|
/* 1 */ {1, s_7_1, -1, 2, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_8_0[7] = {'s', 'u', 'c', 'c', 'e', 'e', 'd'};
|
static symbol s_8_0[7] = {'s', 'u', 'c', 'c', 'e', 'e', 'd'};
|
||||||
|
@ -231,14 +231,14 @@ static symbol s_8_7[6] = {'o', 'u', 't', 'i', 'n', 'g'};
|
||||||
|
|
||||||
static struct among a_8[8] =
|
static struct among a_8[8] =
|
||||||
{
|
{
|
||||||
/* 0 */ {7, s_8_0, -1, -1, 0},
|
/* 0 */ {7, s_8_0, -1, -1, 0},
|
||||||
/* 1 */ {7, s_8_1, -1, -1, 0},
|
/* 1 */ {7, s_8_1, -1, -1, 0},
|
||||||
/* 2 */ {6, s_8_2, -1, -1, 0},
|
/* 2 */ {6, s_8_2, -1, -1, 0},
|
||||||
/* 3 */ {7, s_8_3, -1, -1, 0},
|
/* 3 */ {7, s_8_3, -1, -1, 0},
|
||||||
/* 4 */ {6, s_8_4, -1, -1, 0},
|
/* 4 */ {6, s_8_4, -1, -1, 0},
|
||||||
/* 5 */ {7, s_8_5, -1, -1, 0},
|
/* 5 */ {7, s_8_5, -1, -1, 0},
|
||||||
/* 6 */ {7, s_8_6, -1, -1, 0},
|
/* 6 */ {7, s_8_6, -1, -1, 0},
|
||||||
/* 7 */ {6, s_8_7, -1, -1, 0}
|
/* 7 */ {6, s_8_7, -1, -1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_9_0[5] = {'a', 'n', 'd', 'e', 's'};
|
static symbol s_9_0[5] = {'a', 'n', 'd', 'e', 's'};
|
||||||
|
@ -262,16 +262,16 @@ static symbol s_9_17[4] = {'u', 'g', 'l', 'y'};
|
||||||
|
|
||||||
static struct among a_9[18] =
|
static struct among a_9[18] =
|
||||||
{
|
{
|
||||||
/* 0 */ {5, s_9_0, -1, -1, 0},
|
/* 0 */ {5, s_9_0, -1, -1, 0},
|
||||||
/* 1 */ {5, s_9_1, -1, -1, 0},
|
/* 1 */ {5, s_9_1, -1, -1, 0},
|
||||||
/* 2 */ {4, s_9_2, -1, -1, 0},
|
/* 2 */ {4, s_9_2, -1, -1, 0},
|
||||||
/* 3 */ {6, s_9_3, -1, -1, 0},
|
/* 3 */ {6, s_9_3, -1, -1, 0},
|
||||||
/* 4 */ {5, s_9_4, -1, 3, 0},
|
/* 4 */ {5, s_9_4, -1, 3, 0},
|
||||||
/* 5 */ {5, s_9_5, -1, 9, 0},
|
/* 5 */ {5, s_9_5, -1, 9, 0},
|
||||||
/* 6 */ {6, s_9_6, -1, 7, 0},
|
/* 6 */ {6, s_9_6, -1, 7, 0},
|
||||||
/* 7 */ {4, s_9_7, -1, -1, 0},
|
/* 7 */ {4, s_9_7, -1, -1, 0},
|
||||||
/* 8 */ {4, s_9_8, -1, 6, 0},
|
/* 8 */ {4, s_9_8, -1, 6, 0},
|
||||||
/* 9 */ {5, s_9_9, -1, 4, 0},
|
/* 9 */ {5, s_9_9, -1, 4, 0},
|
||||||
/* 10 */ {4, s_9_10, -1, -1, 0},
|
/* 10 */ {4, s_9_10, -1, -1, 0},
|
||||||
/* 11 */ {4, s_9_11, -1, 10, 0},
|
/* 11 */ {4, s_9_11, -1, 10, 0},
|
||||||
/* 12 */ {6, s_9_12, -1, 11, 0},
|
/* 12 */ {6, s_9_12, -1, 11, 0},
|
||||||
|
@ -1094,12 +1094,14 @@ lab0:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct SN_env *english_create_env(void)
|
extern struct SN_env *
|
||||||
|
english_create_env(void)
|
||||||
{
|
{
|
||||||
return SN_create_env(0, 2, 1);
|
return SN_create_env(0, 2, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void english_close_env(struct SN_env * z)
|
extern void
|
||||||
|
english_close_env(struct SN_env * z)
|
||||||
{
|
{
|
||||||
SN_close_env(z);
|
SN_close_env(z);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,15 +30,15 @@ static symbol s_0_8[6] = {217, 215, 219, 201, 211, 216};
|
||||||
|
|
||||||
static struct among a_0[9] =
|
static struct among a_0[9] =
|
||||||
{
|
{
|
||||||
/* 0 */ {3, s_0_0, -1, 1, 0},
|
/* 0 */ {3, s_0_0, -1, 1, 0},
|
||||||
/* 1 */ {4, s_0_1, 0, 2, 0},
|
/* 1 */ {4, s_0_1, 0, 2, 0},
|
||||||
/* 2 */ {4, s_0_2, 0, 2, 0},
|
/* 2 */ {4, s_0_2, 0, 2, 0},
|
||||||
/* 3 */ {1, s_0_3, -1, 1, 0},
|
/* 3 */ {1, s_0_3, -1, 1, 0},
|
||||||
/* 4 */ {2, s_0_4, 3, 2, 0},
|
/* 4 */ {2, s_0_4, 3, 2, 0},
|
||||||
/* 5 */ {2, s_0_5, 3, 2, 0},
|
/* 5 */ {2, s_0_5, 3, 2, 0},
|
||||||
/* 6 */ {5, s_0_6, -1, 1, 0},
|
/* 6 */ {5, s_0_6, -1, 1, 0},
|
||||||
/* 7 */ {6, s_0_7, 6, 2, 0},
|
/* 7 */ {6, s_0_7, 6, 2, 0},
|
||||||
/* 8 */ {6, s_0_8, 6, 2, 0}
|
/* 8 */ {6, s_0_8, 6, 2, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_1_0[2] = {192, 192};
|
static symbol s_1_0[2] = {192, 192};
|
||||||
|
@ -70,16 +70,16 @@ static symbol s_1_25[3] = {207, 205, 213};
|
||||||
|
|
||||||
static struct among a_1[26] =
|
static struct among a_1[26] =
|
||||||
{
|
{
|
||||||
/* 0 */ {2, s_1_0, -1, 1, 0},
|
/* 0 */ {2, s_1_0, -1, 1, 0},
|
||||||
/* 1 */ {2, s_1_1, -1, 1, 0},
|
/* 1 */ {2, s_1_1, -1, 1, 0},
|
||||||
/* 2 */ {2, s_1_2, -1, 1, 0},
|
/* 2 */ {2, s_1_2, -1, 1, 0},
|
||||||
/* 3 */ {2, s_1_3, -1, 1, 0},
|
/* 3 */ {2, s_1_3, -1, 1, 0},
|
||||||
/* 4 */ {2, s_1_4, -1, 1, 0},
|
/* 4 */ {2, s_1_4, -1, 1, 0},
|
||||||
/* 5 */ {2, s_1_5, -1, 1, 0},
|
/* 5 */ {2, s_1_5, -1, 1, 0},
|
||||||
/* 6 */ {2, s_1_6, -1, 1, 0},
|
/* 6 */ {2, s_1_6, -1, 1, 0},
|
||||||
/* 7 */ {2, s_1_7, -1, 1, 0},
|
/* 7 */ {2, s_1_7, -1, 1, 0},
|
||||||
/* 8 */ {2, s_1_8, -1, 1, 0},
|
/* 8 */ {2, s_1_8, -1, 1, 0},
|
||||||
/* 9 */ {2, s_1_9, -1, 1, 0},
|
/* 9 */ {2, s_1_9, -1, 1, 0},
|
||||||
/* 10 */ {3, s_1_10, -1, 1, 0},
|
/* 10 */ {3, s_1_10, -1, 1, 0},
|
||||||
/* 11 */ {3, s_1_11, -1, 1, 0},
|
/* 11 */ {3, s_1_11, -1, 1, 0},
|
||||||
/* 12 */ {2, s_1_12, -1, 1, 0},
|
/* 12 */ {2, s_1_12, -1, 1, 0},
|
||||||
|
@ -109,14 +109,14 @@ static symbol s_2_7[3] = {213, 192, 221};
|
||||||
|
|
||||||
static struct among a_2[8] =
|
static struct among a_2[8] =
|
||||||
{
|
{
|
||||||
/* 0 */ {2, s_2_0, -1, 1, 0},
|
/* 0 */ {2, s_2_0, -1, 1, 0},
|
||||||
/* 1 */ {2, s_2_1, -1, 1, 0},
|
/* 1 */ {2, s_2_1, -1, 1, 0},
|
||||||
/* 2 */ {2, s_2_2, -1, 1, 0},
|
/* 2 */ {2, s_2_2, -1, 1, 0},
|
||||||
/* 3 */ {3, s_2_3, 2, 2, 0},
|
/* 3 */ {3, s_2_3, 2, 2, 0},
|
||||||
/* 4 */ {3, s_2_4, 2, 2, 0},
|
/* 4 */ {3, s_2_4, 2, 2, 0},
|
||||||
/* 5 */ {1, s_2_5, -1, 1, 0},
|
/* 5 */ {1, s_2_5, -1, 1, 0},
|
||||||
/* 6 */ {2, s_2_6, 5, 1, 0},
|
/* 6 */ {2, s_2_6, 5, 1, 0},
|
||||||
/* 7 */ {3, s_2_7, 6, 2, 0}
|
/* 7 */ {3, s_2_7, 6, 2, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_3_0[2] = {211, 209};
|
static symbol s_3_0[2] = {211, 209};
|
||||||
|
@ -124,8 +124,8 @@ static symbol s_3_1[2] = {211, 216};
|
||||||
|
|
||||||
static struct among a_3[2] =
|
static struct among a_3[2] =
|
||||||
{
|
{
|
||||||
/* 0 */ {2, s_3_0, -1, 1, 0},
|
/* 0 */ {2, s_3_0, -1, 1, 0},
|
||||||
/* 1 */ {2, s_3_1, -1, 1, 0}
|
/* 1 */ {2, s_3_1, -1, 1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_4_0[1] = {192};
|
static symbol s_4_0[1] = {192};
|
||||||
|
@ -177,16 +177,16 @@ static symbol s_4_45[3] = {197, 206, 217};
|
||||||
|
|
||||||
static struct among a_4[46] =
|
static struct among a_4[46] =
|
||||||
{
|
{
|
||||||
/* 0 */ {1, s_4_0, -1, 2, 0},
|
/* 0 */ {1, s_4_0, -1, 2, 0},
|
||||||
/* 1 */ {2, s_4_1, 0, 2, 0},
|
/* 1 */ {2, s_4_1, 0, 2, 0},
|
||||||
/* 2 */ {2, s_4_2, -1, 1, 0},
|
/* 2 */ {2, s_4_2, -1, 1, 0},
|
||||||
/* 3 */ {3, s_4_3, 2, 2, 0},
|
/* 3 */ {3, s_4_3, 2, 2, 0},
|
||||||
/* 4 */ {3, s_4_4, 2, 2, 0},
|
/* 4 */ {3, s_4_4, 2, 2, 0},
|
||||||
/* 5 */ {2, s_4_5, -1, 1, 0},
|
/* 5 */ {2, s_4_5, -1, 1, 0},
|
||||||
/* 6 */ {3, s_4_6, 5, 2, 0},
|
/* 6 */ {3, s_4_6, 5, 2, 0},
|
||||||
/* 7 */ {3, s_4_7, -1, 1, 0},
|
/* 7 */ {3, s_4_7, -1, 1, 0},
|
||||||
/* 8 */ {3, s_4_8, -1, 2, 0},
|
/* 8 */ {3, s_4_8, -1, 2, 0},
|
||||||
/* 9 */ {3, s_4_9, -1, 1, 0},
|
/* 9 */ {3, s_4_9, -1, 1, 0},
|
||||||
/* 10 */ {4, s_4_10, 9, 2, 0},
|
/* 10 */ {4, s_4_10, 9, 2, 0},
|
||||||
/* 11 */ {4, s_4_11, 9, 2, 0},
|
/* 11 */ {4, s_4_11, 9, 2, 0},
|
||||||
/* 12 */ {2, s_4_12, -1, 1, 0},
|
/* 12 */ {2, s_4_12, -1, 1, 0},
|
||||||
|
@ -264,16 +264,16 @@ static symbol s_5_35[1] = {217};
|
||||||
|
|
||||||
static struct among a_5[36] =
|
static struct among a_5[36] =
|
||||||
{
|
{
|
||||||
/* 0 */ {1, s_5_0, -1, 1, 0},
|
/* 0 */ {1, s_5_0, -1, 1, 0},
|
||||||
/* 1 */ {2, s_5_1, 0, 1, 0},
|
/* 1 */ {2, s_5_1, 0, 1, 0},
|
||||||
/* 2 */ {2, s_5_2, 0, 1, 0},
|
/* 2 */ {2, s_5_2, 0, 1, 0},
|
||||||
/* 3 */ {1, s_5_3, -1, 1, 0},
|
/* 3 */ {1, s_5_3, -1, 1, 0},
|
||||||
/* 4 */ {1, s_5_4, -1, 1, 0},
|
/* 4 */ {1, s_5_4, -1, 1, 0},
|
||||||
/* 5 */ {2, s_5_5, 4, 1, 0},
|
/* 5 */ {2, s_5_5, 4, 1, 0},
|
||||||
/* 6 */ {2, s_5_6, 4, 1, 0},
|
/* 6 */ {2, s_5_6, 4, 1, 0},
|
||||||
/* 7 */ {2, s_5_7, -1, 1, 0},
|
/* 7 */ {2, s_5_7, -1, 1, 0},
|
||||||
/* 8 */ {2, s_5_8, -1, 1, 0},
|
/* 8 */ {2, s_5_8, -1, 1, 0},
|
||||||
/* 9 */ {3, s_5_9, 8, 1, 0},
|
/* 9 */ {3, s_5_9, 8, 1, 0},
|
||||||
/* 10 */ {1, s_5_10, -1, 1, 0},
|
/* 10 */ {1, s_5_10, -1, 1, 0},
|
||||||
/* 11 */ {2, s_5_11, 10, 1, 0},
|
/* 11 */ {2, s_5_11, 10, 1, 0},
|
||||||
/* 12 */ {2, s_5_12, 10, 1, 0},
|
/* 12 */ {2, s_5_12, 10, 1, 0},
|
||||||
|
@ -307,8 +307,8 @@ static symbol s_6_1[4] = {207, 211, 212, 216};
|
||||||
|
|
||||||
static struct among a_6[2] =
|
static struct among a_6[2] =
|
||||||
{
|
{
|
||||||
/* 0 */ {3, s_6_0, -1, 1, 0},
|
/* 0 */ {3, s_6_0, -1, 1, 0},
|
||||||
/* 1 */ {4, s_6_1, -1, 1, 0}
|
/* 1 */ {4, s_6_1, -1, 1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static symbol s_7_0[4] = {197, 202, 219, 197};
|
static symbol s_7_0[4] = {197, 202, 219, 197};
|
||||||
|
@ -318,10 +318,10 @@ static symbol s_7_3[3] = {197, 202, 219};
|
||||||
|
|
||||||
static struct among a_7[4] =
|
static struct among a_7[4] =
|
||||||
{
|
{
|
||||||
/* 0 */ {4, s_7_0, -1, 1, 0},
|
/* 0 */ {4, s_7_0, -1, 1, 0},
|
||||||
/* 1 */ {1, s_7_1, -1, 2, 0},
|
/* 1 */ {1, s_7_1, -1, 2, 0},
|
||||||
/* 2 */ {1, s_7_2, -1, 3, 0},
|
/* 2 */ {1, s_7_2, -1, 3, 0},
|
||||||
/* 3 */ {3, s_7_3, -1, 1, 0}
|
/* 3 */ {3, s_7_3, -1, 1, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
static unsigned char g_v[] = {35, 130, 34, 18};
|
static unsigned char g_v[] = {35, 130, 34, 18};
|
||||||
|
@ -753,12 +753,14 @@ lab0:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern struct SN_env *russian_create_env(void)
|
extern struct SN_env *
|
||||||
|
russian_create_env(void)
|
||||||
{
|
{
|
||||||
return SN_create_env(0, 2, 0);
|
return SN_create_env(0, 2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void russian_close_env(struct SN_env * z)
|
extern void
|
||||||
|
russian_close_env(struct SN_env * z)
|
||||||
{
|
{
|
||||||
SN_close_env(z);
|
SN_close_env(z);
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ create_s(void)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void lose_s(symbol * p)
|
extern void
|
||||||
|
lose_s(symbol * p)
|
||||||
{
|
{
|
||||||
free((char *) p - HEAD);
|
free((char *) p - HEAD);
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ compareStatWord(StatEntry * a, WordEntry * b, tsstat * stat, tsvector * txt)
|
||||||
STATSTRPTR(stat) + a->pos,
|
STATSTRPTR(stat) + a->pos,
|
||||||
STRPTR(txt) + b->pos,
|
STRPTR(txt) + b->pos,
|
||||||
a->len
|
a->len
|
||||||
);
|
);
|
||||||
return (a->len > b->len) ? 1 : -1;
|
return (a->len > b->len) ? 1 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.23 2003/08/08 20:20:49 momjian Exp $
|
* $Header: /cvsroot/pgsql/contrib/vacuumlo/vacuumlo.c,v 1.24 2003/08/08 21:41:25 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -149,9 +149,9 @@ vacuumlo(char *database, struct _param * param)
|
||||||
*
|
*
|
||||||
* NOTE: we ignore system tables and temp tables by the expedient of
|
* NOTE: we ignore system tables and temp tables by the expedient of
|
||||||
* rejecting tables in schemas named 'pg_*'. In particular, the temp
|
* rejecting tables in schemas named 'pg_*'. In particular, the temp
|
||||||
* table formed above is ignored, and pg_largeobject will be too.
|
* table formed above is ignored, and pg_largeobject will be too. If
|
||||||
* If either of these were scanned, obviously we'd end up with nothing
|
* either of these were scanned, obviously we'd end up with nothing to
|
||||||
* to delete...
|
* delete...
|
||||||
*
|
*
|
||||||
* NOTE: the system oid column is ignored, as it has attnum < 1. This
|
* NOTE: the system oid column is ignored, as it has attnum < 1. This
|
||||||
* shouldn't matter for correctness, but it saves time.
|
* shouldn't matter for correctness, but it saves time.
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.69 2003/08/04 02:39:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/index/indexam.c,v 1.70 2003/08/08 21:41:25 momjian Exp $
|
||||||
*
|
*
|
||||||
* INTERFACE ROUTINES
|
* INTERFACE ROUTINES
|
||||||
* index_open - open an index relation by relation OID
|
* index_open - open an index relation by relation OID
|
||||||
|
@ -632,7 +632,7 @@ index_bulk_delete(Relation indexRelation,
|
||||||
*/
|
*/
|
||||||
IndexBulkDeleteResult *
|
IndexBulkDeleteResult *
|
||||||
index_vacuum_cleanup(Relation indexRelation,
|
index_vacuum_cleanup(Relation indexRelation,
|
||||||
IndexVacuumCleanupInfo * info,
|
IndexVacuumCleanupInfo *info,
|
||||||
IndexBulkDeleteResult *stats)
|
IndexBulkDeleteResult *stats)
|
||||||
{
|
{
|
||||||
RegProcedure procedure;
|
RegProcedure procedure;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.68 2003/08/04 02:39:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtpage.c,v 1.69 2003/08/08 21:41:27 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Postgres btree pages look like ordinary relation pages. The opaque
|
* Postgres btree pages look like ordinary relation pages. The opaque
|
||||||
|
@ -1110,11 +1110,10 @@ _bt_pagedel(Relation rel, Buffer buf, bool vacuum_full)
|
||||||
_bt_wrtbuf(rel, lbuf);
|
_bt_wrtbuf(rel, lbuf);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If parent became half dead, recurse to try to delete it.
|
* If parent became half dead, recurse to try to delete it. Otherwise,
|
||||||
* Otherwise, if right sibling is empty and is now the last child of
|
* if right sibling is empty and is now the last child of the parent,
|
||||||
* the parent, recurse to try to delete it. (These cases cannot apply
|
* recurse to try to delete it. (These cases cannot apply at the same
|
||||||
* at the same time, though the second case might itself recurse to
|
* time, though the second case might itself recurse to the first.)
|
||||||
* the first.)
|
|
||||||
*/
|
*/
|
||||||
if (parent_half_dead)
|
if (parent_half_dead)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.79 2003/08/04 02:39:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.80 2003/08/08 21:41:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -951,9 +951,9 @@ _bt_walk_left(Relation rel, Buffer buf)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this isn't the page we want, walk right till we find what we
|
* If this isn't the page we want, walk right till we find what we
|
||||||
* want --- but go no more than four hops (an arbitrary limit).
|
* want --- but go no more than four hops (an arbitrary limit). If
|
||||||
* If we don't find the correct page by then, the most likely bet
|
* we don't find the correct page by then, the most likely bet is
|
||||||
* is that the original page got deleted and isn't in the sibling
|
* that the original page got deleted and isn't in the sibling
|
||||||
* chain at all anymore, not that its left sibling got split more
|
* chain at all anymore, not that its left sibling got split more
|
||||||
* than four times.
|
* than four times.
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.5 2003/08/04 02:39:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.6 2003/08/08 21:41:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ typedef struct bt_incomplete_split
|
||||||
BlockNumber leftblk; /* left half of split */
|
BlockNumber leftblk; /* left half of split */
|
||||||
BlockNumber rightblk; /* right half of split */
|
BlockNumber rightblk; /* right half of split */
|
||||||
bool is_root; /* we split the root */
|
bool is_root; /* we split the root */
|
||||||
} bt_incomplete_split;
|
} bt_incomplete_split;
|
||||||
|
|
||||||
static List *incomplete_splits;
|
static List *incomplete_splits;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.5 2003/08/08 14:39:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/transam/slru.c,v 1.6 2003/08/08 21:41:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -93,7 +93,7 @@ typedef enum
|
||||||
SLRU_PAGE_CLEAN, /* page is valid and not dirty */
|
SLRU_PAGE_CLEAN, /* page is valid and not dirty */
|
||||||
SLRU_PAGE_DIRTY, /* page is valid but needs write */
|
SLRU_PAGE_DIRTY, /* page is valid but needs write */
|
||||||
SLRU_PAGE_WRITE_IN_PROGRESS /* page is being written out */
|
SLRU_PAGE_WRITE_IN_PROGRESS /* page is being written out */
|
||||||
} SlruPageStatus;
|
} SlruPageStatus;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Shared-memory state
|
* Shared-memory state
|
||||||
|
@ -117,7 +117,7 @@ typedef struct SlruSharedData
|
||||||
* swapping out the latest page.
|
* swapping out the latest page.
|
||||||
*/
|
*/
|
||||||
int latest_page_number;
|
int latest_page_number;
|
||||||
} SlruSharedData;
|
} SlruSharedData;
|
||||||
typedef SlruSharedData *SlruShared;
|
typedef SlruSharedData *SlruShared;
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ typedef enum
|
||||||
SLRU_SEEK_FAILED,
|
SLRU_SEEK_FAILED,
|
||||||
SLRU_READ_FAILED,
|
SLRU_READ_FAILED,
|
||||||
SLRU_WRITE_FAILED
|
SLRU_WRITE_FAILED
|
||||||
} SlruErrorCause;
|
} SlruErrorCause;
|
||||||
static SlruErrorCause slru_errcause;
|
static SlruErrorCause slru_errcause;
|
||||||
static int slru_errno;
|
static int slru_errno;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.151 2003/08/04 02:39:57 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.152 2003/08/08 21:41:28 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Transaction aborts can now occur two ways:
|
* Transaction aborts can now occur two ways:
|
||||||
|
@ -954,9 +954,9 @@ CommitTransaction(void)
|
||||||
*
|
*
|
||||||
* The ordering of operations is not entirely random. The idea is:
|
* The ordering of operations is not entirely random. The idea is:
|
||||||
* release resources visible to other backends (eg, files, buffer
|
* release resources visible to other backends (eg, files, buffer
|
||||||
* pins); then release locks; then release backend-local resources.
|
* pins); then release locks; then release backend-local resources. We
|
||||||
* We want to release locks at the point where any backend waiting for
|
* want to release locks at the point where any backend waiting for us
|
||||||
* us will see our transaction as being fully cleaned up.
|
* will see our transaction as being fully cleaned up.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
smgrDoPendingDeletes(true);
|
smgrDoPendingDeletes(true);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.114 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.115 2003/08/08 21:41:28 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -60,10 +60,10 @@ typedef struct
|
||||||
{
|
{
|
||||||
Oid tableOid;
|
Oid tableOid;
|
||||||
Oid indexOid;
|
Oid indexOid;
|
||||||
} RelToCluster;
|
} RelToCluster;
|
||||||
|
|
||||||
|
|
||||||
static void cluster_rel(RelToCluster * rv, bool recheck);
|
static void cluster_rel(RelToCluster *rv, bool recheck);
|
||||||
static Oid make_new_heap(Oid OIDOldHeap, const char *NewName);
|
static Oid make_new_heap(Oid OIDOldHeap, const char *NewName);
|
||||||
static void copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex);
|
static void copy_heap_data(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex);
|
||||||
static List *get_indexattr_list(Relation OldHeap, Oid OldIndex);
|
static List *get_indexattr_list(Relation OldHeap, Oid OldIndex);
|
||||||
|
@ -248,7 +248,7 @@ cluster(ClusterStmt *stmt)
|
||||||
* them incrementally while we load the table.
|
* them incrementally while we load the table.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
cluster_rel(RelToCluster * rvtc, bool recheck)
|
cluster_rel(RelToCluster *rvtc, bool recheck)
|
||||||
{
|
{
|
||||||
Relation OldHeap,
|
Relation OldHeap,
|
||||||
OldIndex;
|
OldIndex;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.207 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.208 2003/08/08 21:41:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -61,7 +61,7 @@ typedef enum CopyDest
|
||||||
COPY_FILE, /* to/from file */
|
COPY_FILE, /* to/from file */
|
||||||
COPY_OLD_FE, /* to/from frontend (old protocol) */
|
COPY_OLD_FE, /* to/from frontend (old protocol) */
|
||||||
COPY_NEW_FE /* to/from frontend (new protocol) */
|
COPY_NEW_FE /* to/from frontend (new protocol) */
|
||||||
} CopyDest;
|
} CopyDest;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Represents the type of data returned by CopyReadAttribute()
|
* Represents the type of data returned by CopyReadAttribute()
|
||||||
|
@ -82,7 +82,7 @@ typedef enum EolType
|
||||||
EOL_NL,
|
EOL_NL,
|
||||||
EOL_CR,
|
EOL_CR,
|
||||||
EOL_CRNL
|
EOL_CRNL
|
||||||
} EolType;
|
} EolType;
|
||||||
|
|
||||||
|
|
||||||
/* non-export function prototypes */
|
/* non-export function prototypes */
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1994-5, Regents of the University of California
|
* Portions Copyright (c) 1994-5, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.113 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.114 2003/08/08 21:41:30 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -47,7 +47,7 @@ static void ExplainOneQuery(Query *query, ExplainStmt *stmt,
|
||||||
TupOutputState *tstate);
|
TupOutputState *tstate);
|
||||||
static double elapsed_time(struct timeval * starttime);
|
static double elapsed_time(struct timeval * starttime);
|
||||||
static void explain_outNode(StringInfo str,
|
static void explain_outNode(StringInfo str,
|
||||||
Plan *plan, PlanState * planstate,
|
Plan *plan, PlanState *planstate,
|
||||||
Plan *outer_plan,
|
Plan *outer_plan,
|
||||||
int indent, ExplainState *es);
|
int indent, ExplainState *es);
|
||||||
static void show_scan_qual(List *qual, bool is_or_qual, const char *qlabel,
|
static void show_scan_qual(List *qual, bool is_or_qual, const char *qlabel,
|
||||||
|
@ -313,7 +313,7 @@ elapsed_time(struct timeval * starttime)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
explain_outNode(StringInfo str,
|
explain_outNode(StringInfo str,
|
||||||
Plan *plan, PlanState * planstate,
|
Plan *plan, PlanState *planstate,
|
||||||
Plan *outer_plan,
|
Plan *outer_plan,
|
||||||
int indent, ExplainState *es)
|
int indent, ExplainState *es)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.22 2003/08/06 17:46:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.23 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -36,7 +36,7 @@
|
||||||
* Execute SQL DECLARE CURSOR command.
|
* Execute SQL DECLARE CURSOR command.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
PerformCursorOpen(DeclareCursorStmt * stmt)
|
PerformCursorOpen(DeclareCursorStmt *stmt)
|
||||||
{
|
{
|
||||||
List *rewritten;
|
List *rewritten;
|
||||||
Query *query;
|
Query *query;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
|
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.22 2003/08/04 00:43:16 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/prepare.c,v 1.23 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -412,7 +412,7 @@ FetchPreparedStatementParams(const char *stmt_name)
|
||||||
* Note: the result is created or copied into current memory context.
|
* Note: the result is created or copied into current memory context.
|
||||||
*/
|
*/
|
||||||
TupleDesc
|
TupleDesc
|
||||||
FetchPreparedStatementResultDesc(PreparedStatement * stmt)
|
FetchPreparedStatementResultDesc(PreparedStatement *stmt)
|
||||||
{
|
{
|
||||||
Query *query;
|
Query *query;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.101 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.102 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -302,7 +302,7 @@ DefineSequence(CreateSeqStmt *seq)
|
||||||
* Modify the defition of a sequence relation
|
* Modify the defition of a sequence relation
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
AlterSequence(AlterSeqStmt * stmt)
|
AlterSequence(AlterSeqStmt *stmt)
|
||||||
{
|
{
|
||||||
SeqTable elm;
|
SeqTable elm;
|
||||||
Relation seqrel;
|
Relation seqrel;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.78 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.79 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -69,7 +69,7 @@ typedef struct OnCommitItem
|
||||||
*/
|
*/
|
||||||
bool created_in_cur_xact;
|
bool created_in_cur_xact;
|
||||||
bool deleted_in_cur_xact;
|
bool deleted_in_cur_xact;
|
||||||
} OnCommitItem;
|
} OnCommitItem;
|
||||||
|
|
||||||
static List *on_commits = NIL;
|
static List *on_commits = NIL;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.155 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.156 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1653,7 +1653,7 @@ typedef struct DeferredTriggersData
|
||||||
DeferredTriggerEvent deftrig_events;
|
DeferredTriggerEvent deftrig_events;
|
||||||
DeferredTriggerEvent deftrig_events_imm;
|
DeferredTriggerEvent deftrig_events_imm;
|
||||||
DeferredTriggerEvent deftrig_event_tail;
|
DeferredTriggerEvent deftrig_event_tail;
|
||||||
} DeferredTriggersData;
|
} DeferredTriggersData;
|
||||||
|
|
||||||
/* ----------
|
/* ----------
|
||||||
* deftrig_events, deftrig_event_tail:
|
* deftrig_events, deftrig_event_tail:
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.42 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/typecmds.c,v 1.43 2003/08/08 21:41:32 momjian Exp $
|
||||||
*
|
*
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
* The "DefineFoo" routines take the parse tree and pick out the
|
* The "DefineFoo" routines take the parse tree and pick out the
|
||||||
|
@ -70,7 +70,7 @@ typedef struct
|
||||||
int natts; /* number of attributes of interest */
|
int natts; /* number of attributes of interest */
|
||||||
int *atts; /* attribute numbers */
|
int *atts; /* attribute numbers */
|
||||||
/* atts[] is of allocated length RelationGetNumberOfAttributes(rel) */
|
/* atts[] is of allocated length RelationGetNumberOfAttributes(rel) */
|
||||||
} RelToCheck;
|
} RelToCheck;
|
||||||
|
|
||||||
|
|
||||||
static Oid findTypeInputFunction(List *procname, Oid typeOid);
|
static Oid findTypeInputFunction(List *procname, Oid typeOid);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.74 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.75 2003/08/08 21:41:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecReScan(PlanState * node, ExprContext *exprCtxt)
|
ExecReScan(PlanState *node, ExprContext *exprCtxt)
|
||||||
{
|
{
|
||||||
/* If collecting timing stats, update them */
|
/* If collecting timing stats, update them */
|
||||||
if (node->instrument)
|
if (node->instrument)
|
||||||
|
@ -177,7 +177,7 @@ ExecReScan(PlanState * node, ExprContext *exprCtxt)
|
||||||
* Marks the current scan position.
|
* Marks the current scan position.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecMarkPos(PlanState * node)
|
ExecMarkPos(PlanState *node)
|
||||||
{
|
{
|
||||||
switch (nodeTag(node))
|
switch (nodeTag(node))
|
||||||
{
|
{
|
||||||
|
@ -218,7 +218,7 @@ ExecMarkPos(PlanState * node)
|
||||||
* restores the scan position previously saved with ExecMarkPos()
|
* restores the scan position previously saved with ExecMarkPos()
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecRestrPos(PlanState * node)
|
ExecRestrPos(PlanState *node)
|
||||||
{
|
{
|
||||||
switch (nodeTag(node))
|
switch (nodeTag(node))
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execGrouping.c,v 1.6 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execGrouping.c,v 1.7 2003/08/08 21:41:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -296,7 +296,7 @@ BuildTupleHashTable(int numCols, AttrNumber *keyColIdx,
|
||||||
Assert(entrysize >= sizeof(TupleHashEntryData));
|
Assert(entrysize >= sizeof(TupleHashEntryData));
|
||||||
|
|
||||||
tabsize = sizeof(TupleHashTableData) +
|
tabsize = sizeof(TupleHashTableData) +
|
||||||
(nbuckets - 1) * sizeof(TupleHashEntry);
|
(nbuckets - 1) *sizeof(TupleHashEntry);
|
||||||
hashtable = (TupleHashTable) MemoryContextAllocZero(tablecxt, tabsize);
|
hashtable = (TupleHashTable) MemoryContextAllocZero(tablecxt, tabsize);
|
||||||
|
|
||||||
hashtable->numCols = numCols;
|
hashtable->numCols = numCols;
|
||||||
|
@ -411,7 +411,7 @@ LookupTupleHashEntry(TupleHashTable hashtable, TupleTableSlot *slot,
|
||||||
* Iterator state must be initialized with ResetTupleHashIterator() macro.
|
* Iterator state must be initialized with ResetTupleHashIterator() macro.
|
||||||
*/
|
*/
|
||||||
TupleHashEntry
|
TupleHashEntry
|
||||||
ScanTupleHashTable(TupleHashTable hashtable, TupleHashIterator * state)
|
ScanTupleHashTable(TupleHashTable hashtable, TupleHashIterator *state)
|
||||||
{
|
{
|
||||||
TupleHashEntry entry;
|
TupleHashEntry entry;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.215 2003/08/06 17:46:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.216 2003/08/08 21:41:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -68,7 +68,7 @@ static void initResultRelInfo(ResultRelInfo *resultRelInfo,
|
||||||
Index resultRelationIndex,
|
Index resultRelationIndex,
|
||||||
List *rangeTable,
|
List *rangeTable,
|
||||||
CmdType operation);
|
CmdType operation);
|
||||||
static TupleTableSlot *ExecutePlan(EState *estate, PlanState * planstate,
|
static TupleTableSlot *ExecutePlan(EState *estate, PlanState *planstate,
|
||||||
CmdType operation,
|
CmdType operation,
|
||||||
long numberTuples,
|
long numberTuples,
|
||||||
ScanDirection direction,
|
ScanDirection direction,
|
||||||
|
@ -895,7 +895,7 @@ initResultRelInfo(ResultRelInfo *resultRelInfo,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndPlan(PlanState * planstate, EState *estate)
|
ExecEndPlan(PlanState *planstate, EState *estate)
|
||||||
{
|
{
|
||||||
ResultRelInfo *resultRelInfo;
|
ResultRelInfo *resultRelInfo;
|
||||||
int i;
|
int i;
|
||||||
|
@ -965,7 +965,7 @@ ExecEndPlan(PlanState * planstate, EState *estate)
|
||||||
*/
|
*/
|
||||||
static TupleTableSlot *
|
static TupleTableSlot *
|
||||||
ExecutePlan(EState *estate,
|
ExecutePlan(EState *estate,
|
||||||
PlanState * planstate,
|
PlanState *planstate,
|
||||||
CmdType operation,
|
CmdType operation,
|
||||||
long numberTuples,
|
long numberTuples,
|
||||||
ScanDirection direction,
|
ScanDirection direction,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.39 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.40 2003/08/08 21:41:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -268,7 +268,7 @@ ExecInitNode(Plan *node, EState *estate)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
TupleTableSlot *
|
TupleTableSlot *
|
||||||
ExecProcNode(PlanState * node)
|
ExecProcNode(PlanState *node)
|
||||||
{
|
{
|
||||||
TupleTableSlot *result;
|
TupleTableSlot *result;
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ ExecCountSlotsNode(Plan *node)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndNode(PlanState * node)
|
ExecEndNode(PlanState *node)
|
||||||
{
|
{
|
||||||
List *subp;
|
List *subp;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.140 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.141 2003/08/08 21:41:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -50,53 +50,53 @@
|
||||||
|
|
||||||
|
|
||||||
/* static function decls */
|
/* static function decls */
|
||||||
static Datum ExecEvalAggref(AggrefExprState * aggref,
|
static Datum ExecEvalAggref(AggrefExprState *aggref,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalArrayRef(ArrayRefExprState * astate,
|
static Datum ExecEvalArrayRef(ArrayRefExprState *astate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull);
|
static Datum ExecEvalVar(Var *variable, ExprContext *econtext, bool *isNull);
|
||||||
static Datum ExecEvalParam(Param *expression, ExprContext *econtext,
|
static Datum ExecEvalParam(Param *expression, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalFunc(FuncExprState * fcache, ExprContext *econtext,
|
static Datum ExecEvalFunc(FuncExprState *fcache, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalOper(FuncExprState * fcache, ExprContext *econtext,
|
static Datum ExecEvalOper(FuncExprState *fcache, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalDistinct(FuncExprState * fcache, ExprContext *econtext,
|
static Datum ExecEvalDistinct(FuncExprState *fcache, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalScalarArrayOp(ScalarArrayOpExprState * sstate,
|
static Datum ExecEvalScalarArrayOp(ScalarArrayOpExprState *sstate,
|
||||||
ExprContext *econtext, bool *isNull);
|
ExprContext *econtext, bool *isNull);
|
||||||
static ExprDoneCond ExecEvalFuncArgs(FunctionCallInfo fcinfo,
|
static ExprDoneCond ExecEvalFuncArgs(FunctionCallInfo fcinfo,
|
||||||
List *argList, ExprContext *econtext);
|
List *argList, ExprContext *econtext);
|
||||||
static Datum ExecEvalNot(BoolExprState * notclause, ExprContext *econtext,
|
static Datum ExecEvalNot(BoolExprState *notclause, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalOr(BoolExprState * orExpr, ExprContext *econtext,
|
static Datum ExecEvalOr(BoolExprState *orExpr, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalAnd(BoolExprState * andExpr, ExprContext *econtext,
|
static Datum ExecEvalAnd(BoolExprState *andExpr, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalCase(CaseExprState * caseExpr, ExprContext *econtext,
|
static Datum ExecEvalCase(CaseExprState *caseExpr, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalArray(ArrayExprState * astate,
|
static Datum ExecEvalArray(ArrayExprState *astate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalCoalesce(CoalesceExprState * coalesceExpr,
|
static Datum ExecEvalCoalesce(CoalesceExprState *coalesceExpr,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalNullIf(FuncExprState * nullIfExpr, ExprContext *econtext,
|
static Datum ExecEvalNullIf(FuncExprState *nullIfExpr, ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecEvalNullTest(GenericExprState * nstate,
|
static Datum ExecEvalNullTest(GenericExprState *nstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalBooleanTest(GenericExprState * bstate,
|
static Datum ExecEvalBooleanTest(GenericExprState *bstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalCoerceToDomain(CoerceToDomainState * cstate,
|
static Datum ExecEvalCoerceToDomain(CoerceToDomainState *cstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
static Datum ExecEvalCoerceToDomainValue(CoerceToDomainValue * conVal,
|
static Datum ExecEvalCoerceToDomainValue(CoerceToDomainValue *conVal,
|
||||||
ExprContext *econtext, bool *isNull);
|
ExprContext *econtext, bool *isNull);
|
||||||
static Datum ExecEvalFieldSelect(GenericExprState * fstate,
|
static Datum ExecEvalFieldSelect(GenericExprState *fstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ static Datum ExecEvalFieldSelect(GenericExprState * fstate,
|
||||||
*----------
|
*----------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalArrayRef(ArrayRefExprState * astate,
|
ExecEvalArrayRef(ArrayRefExprState *astate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -301,7 +301,7 @@ ExecEvalArrayRef(ArrayRefExprState * astate,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalAggref(AggrefExprState * aggref, ExprContext *econtext, bool *isNull)
|
ExecEvalAggref(AggrefExprState *aggref, ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
if (econtext->ecxt_aggvalues == NULL) /* safety check */
|
if (econtext->ecxt_aggvalues == NULL) /* safety check */
|
||||||
elog(ERROR, "no aggregates in this expression context");
|
elog(ERROR, "no aggregates in this expression context");
|
||||||
|
@ -606,7 +606,7 @@ GetAttributeByName(TupleTableSlot *slot, char *attname, bool *isNull)
|
||||||
* init_fcache - initialize a FuncExprState node during first use
|
* init_fcache - initialize a FuncExprState node during first use
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
init_fcache(Oid foid, FuncExprState * fcache, MemoryContext fcacheCxt)
|
init_fcache(Oid foid, FuncExprState *fcache, MemoryContext fcacheCxt)
|
||||||
{
|
{
|
||||||
AclResult aclresult;
|
AclResult aclresult;
|
||||||
|
|
||||||
|
@ -679,7 +679,7 @@ ExecEvalFuncArgs(FunctionCallInfo fcinfo,
|
||||||
* Evaluate the arguments to a function and then the function itself.
|
* Evaluate the arguments to a function and then the function itself.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
ExecMakeFunctionResult(FuncExprState * fcache,
|
ExecMakeFunctionResult(FuncExprState *fcache,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -882,7 +882,7 @@ ExecMakeFunctionResult(FuncExprState * fcache,
|
||||||
* object. (If function returns an empty set, we just return NULL instead.)
|
* object. (If function returns an empty set, we just return NULL instead.)
|
||||||
*/
|
*/
|
||||||
Tuplestorestate *
|
Tuplestorestate *
|
||||||
ExecMakeTableFunctionResult(ExprState * funcexpr,
|
ExecMakeTableFunctionResult(ExprState *funcexpr,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
TupleDesc expectedDesc,
|
TupleDesc expectedDesc,
|
||||||
TupleDesc *returnDesc)
|
TupleDesc *returnDesc)
|
||||||
|
@ -1159,7 +1159,7 @@ ExecMakeTableFunctionResult(ExprState * funcexpr,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalFunc(FuncExprState * fcache,
|
ExecEvalFunc(FuncExprState *fcache,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -1182,7 +1182,7 @@ ExecEvalFunc(FuncExprState * fcache,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalOper(FuncExprState * fcache,
|
ExecEvalOper(FuncExprState *fcache,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -1212,7 +1212,7 @@ ExecEvalOper(FuncExprState * fcache,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalDistinct(FuncExprState * fcache,
|
ExecEvalDistinct(FuncExprState *fcache,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
|
@ -1278,7 +1278,7 @@ ExecEvalDistinct(FuncExprState * fcache,
|
||||||
* the result is known.
|
* the result is known.
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalScalarArrayOp(ScalarArrayOpExprState * sstate,
|
ExecEvalScalarArrayOp(ScalarArrayOpExprState *sstate,
|
||||||
ExprContext *econtext, bool *isNull)
|
ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
ScalarArrayOpExpr *opexpr = (ScalarArrayOpExpr *) sstate->fxprstate.xprstate.expr;
|
ScalarArrayOpExpr *opexpr = (ScalarArrayOpExpr *) sstate->fxprstate.xprstate.expr;
|
||||||
|
@ -1431,7 +1431,7 @@ ExecEvalScalarArrayOp(ScalarArrayOpExprState * sstate,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalNot(BoolExprState * notclause, ExprContext *econtext, bool *isNull)
|
ExecEvalNot(BoolExprState *notclause, ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
ExprState *clause;
|
ExprState *clause;
|
||||||
Datum expr_value;
|
Datum expr_value;
|
||||||
|
@ -1459,7 +1459,7 @@ ExecEvalNot(BoolExprState * notclause, ExprContext *econtext, bool *isNull)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalOr(BoolExprState * orExpr, ExprContext *econtext, bool *isNull)
|
ExecEvalOr(BoolExprState *orExpr, ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
List *clauses;
|
List *clauses;
|
||||||
List *clause;
|
List *clause;
|
||||||
|
@ -1507,7 +1507,7 @@ ExecEvalOr(BoolExprState * orExpr, ExprContext *econtext, bool *isNull)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalAnd(BoolExprState * andExpr, ExprContext *econtext, bool *isNull)
|
ExecEvalAnd(BoolExprState *andExpr, ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
List *clauses;
|
List *clauses;
|
||||||
List *clause;
|
List *clause;
|
||||||
|
@ -1555,7 +1555,7 @@ ExecEvalAnd(BoolExprState * andExpr, ExprContext *econtext, bool *isNull)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalCase(CaseExprState * caseExpr, ExprContext *econtext,
|
ExecEvalCase(CaseExprState *caseExpr, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone)
|
bool *isNull, ExprDoneCond *isDone)
|
||||||
{
|
{
|
||||||
List *clauses;
|
List *clauses;
|
||||||
|
@ -1613,7 +1613,7 @@ ExecEvalCase(CaseExprState * caseExpr, ExprContext *econtext,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalArray(ArrayExprState * astate, ExprContext *econtext,
|
ExecEvalArray(ArrayExprState *astate, ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
ArrayExpr *arrayExpr = (ArrayExpr *) astate->xprstate.expr;
|
ArrayExpr *arrayExpr = (ArrayExpr *) astate->xprstate.expr;
|
||||||
|
@ -1770,7 +1770,7 @@ ExecEvalArray(ArrayExprState * astate, ExprContext *econtext,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalCoalesce(CoalesceExprState * coalesceExpr, ExprContext *econtext,
|
ExecEvalCoalesce(CoalesceExprState *coalesceExpr, ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
List *arg;
|
List *arg;
|
||||||
|
@ -1800,7 +1800,7 @@ ExecEvalCoalesce(CoalesceExprState * coalesceExpr, ExprContext *econtext,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalNullIf(FuncExprState * fcache, ExprContext *econtext,
|
ExecEvalNullIf(FuncExprState *fcache, ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
Datum result;
|
Datum result;
|
||||||
|
@ -1859,7 +1859,7 @@ ExecEvalNullIf(FuncExprState * fcache, ExprContext *econtext,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalNullTest(GenericExprState * nstate,
|
ExecEvalNullTest(GenericExprState *nstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -1904,7 +1904,7 @@ ExecEvalNullTest(GenericExprState * nstate,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalBooleanTest(GenericExprState * bstate,
|
ExecEvalBooleanTest(GenericExprState *bstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -1990,7 +1990,7 @@ ExecEvalBooleanTest(GenericExprState * bstate,
|
||||||
* datum) otherwise throw an error.
|
* datum) otherwise throw an error.
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalCoerceToDomain(CoerceToDomainState * cstate, ExprContext *econtext,
|
ExecEvalCoerceToDomain(CoerceToDomainState *cstate, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone)
|
bool *isNull, ExprDoneCond *isDone)
|
||||||
{
|
{
|
||||||
CoerceToDomain *ctest = (CoerceToDomain *) cstate->xprstate.expr;
|
CoerceToDomain *ctest = (CoerceToDomain *) cstate->xprstate.expr;
|
||||||
|
@ -2067,7 +2067,7 @@ ExecEvalCoerceToDomain(CoerceToDomainState * cstate, ExprContext *econtext,
|
||||||
* Return the value stored by CoerceToDomain.
|
* Return the value stored by CoerceToDomain.
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalCoerceToDomainValue(CoerceToDomainValue * conVal,
|
ExecEvalCoerceToDomainValue(CoerceToDomainValue *conVal,
|
||||||
ExprContext *econtext, bool *isNull)
|
ExprContext *econtext, bool *isNull)
|
||||||
{
|
{
|
||||||
*isNull = econtext->domainValue_isNull;
|
*isNull = econtext->domainValue_isNull;
|
||||||
|
@ -2081,7 +2081,7 @@ ExecEvalCoerceToDomainValue(CoerceToDomainValue * conVal,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecEvalFieldSelect(GenericExprState * fstate,
|
ExecEvalFieldSelect(GenericExprState *fstate,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -2145,7 +2145,7 @@ ExecEvalFieldSelect(GenericExprState * fstate,
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
ExecEvalExpr(ExprState * expression,
|
ExecEvalExpr(ExprState *expression,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -2312,7 +2312,7 @@ ExecEvalExpr(ExprState * expression,
|
||||||
* Same as above, but get into the right allocation context explicitly.
|
* Same as above, but get into the right allocation context explicitly.
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
ExecEvalExprSwitchContext(ExprState * expression,
|
ExecEvalExprSwitchContext(ExprState *expression,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone)
|
ExprDoneCond *isDone)
|
||||||
|
@ -2360,7 +2360,7 @@ ExecEvalExprSwitchContext(ExprState * expression,
|
||||||
* This case should usually come through ExecPrepareExpr, not directly here.
|
* This case should usually come through ExecPrepareExpr, not directly here.
|
||||||
*/
|
*/
|
||||||
ExprState *
|
ExprState *
|
||||||
ExecInitExpr(Expr *node, PlanState * parent)
|
ExecInitExpr(Expr *node, PlanState *parent)
|
||||||
{
|
{
|
||||||
ExprState *state;
|
ExprState *state;
|
||||||
|
|
||||||
|
@ -2683,7 +2683,7 @@ ExecInitExpr(Expr *node, PlanState * parent)
|
||||||
* subplan list.
|
* subplan list.
|
||||||
*/
|
*/
|
||||||
SubPlanState *
|
SubPlanState *
|
||||||
ExecInitExprInitPlan(SubPlan *node, PlanState * parent)
|
ExecInitExprInitPlan(SubPlan *node, PlanState *parent)
|
||||||
{
|
{
|
||||||
SubPlanState *sstate = makeNode(SubPlanState);
|
SubPlanState *sstate = makeNode(SubPlanState);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.26 2003/08/08 14:39:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execScan.c,v 1.27 2003/08/08 21:41:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ static bool tlist_matches_tupdesc(List *tlist, Index varno, TupleDesc tupdesc);
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
TupleTableSlot *
|
TupleTableSlot *
|
||||||
ExecScan(ScanState * node,
|
ExecScan(ScanState *node,
|
||||||
ExecScanAccessMtd accessMtd) /* function returning a tuple */
|
ExecScanAccessMtd accessMtd) /* function returning a tuple */
|
||||||
{
|
{
|
||||||
EState *estate;
|
EState *estate;
|
||||||
|
@ -176,7 +176,7 @@ ExecScan(ScanState * node,
|
||||||
* ExecAssignScanType must have been called already.
|
* ExecAssignScanType must have been called already.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignScanProjectionInfo(ScanState * node)
|
ExecAssignScanProjectionInfo(ScanState *node)
|
||||||
{
|
{
|
||||||
Scan *scan = (Scan *) node->ps.plan;
|
Scan *scan = (Scan *) node->ps.plan;
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.70 2003/08/06 17:46:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.71 2003/08/08 21:41:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -482,7 +482,7 @@ ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, /* slot to change */
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecInitResultTupleSlot(EState *estate, PlanState * planstate)
|
ExecInitResultTupleSlot(EState *estate, PlanState *planstate)
|
||||||
{
|
{
|
||||||
INIT_SLOT_DEFS;
|
INIT_SLOT_DEFS;
|
||||||
INIT_SLOT_ALLOC;
|
INIT_SLOT_ALLOC;
|
||||||
|
@ -494,7 +494,7 @@ ExecInitResultTupleSlot(EState *estate, PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecInitScanTupleSlot(EState *estate, ScanState * scanstate)
|
ExecInitScanTupleSlot(EState *estate, ScanState *scanstate)
|
||||||
{
|
{
|
||||||
INIT_SLOT_DEFS;
|
INIT_SLOT_DEFS;
|
||||||
INIT_SLOT_ALLOC;
|
INIT_SLOT_ALLOC;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.102 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.103 2003/08/08 21:41:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -385,7 +385,7 @@ MakePerTupleExprContext(EState *estate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignExprContext(EState *estate, PlanState * planstate)
|
ExecAssignExprContext(EState *estate, PlanState *planstate)
|
||||||
{
|
{
|
||||||
planstate->ps_ExprContext = CreateExprContext(estate);
|
planstate->ps_ExprContext = CreateExprContext(estate);
|
||||||
}
|
}
|
||||||
|
@ -395,7 +395,7 @@ ExecAssignExprContext(EState *estate, PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignResultType(PlanState * planstate,
|
ExecAssignResultType(PlanState *planstate,
|
||||||
TupleDesc tupDesc, bool shouldFree)
|
TupleDesc tupDesc, bool shouldFree)
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
|
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
|
||||||
|
@ -408,7 +408,7 @@ ExecAssignResultType(PlanState * planstate,
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignResultTypeFromOuterPlan(PlanState * planstate)
|
ExecAssignResultTypeFromOuterPlan(PlanState *planstate)
|
||||||
{
|
{
|
||||||
PlanState *outerPlan;
|
PlanState *outerPlan;
|
||||||
TupleDesc tupDesc;
|
TupleDesc tupDesc;
|
||||||
|
@ -424,7 +424,7 @@ ExecAssignResultTypeFromOuterPlan(PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignResultTypeFromTL(PlanState * planstate)
|
ExecAssignResultTypeFromTL(PlanState *planstate)
|
||||||
{
|
{
|
||||||
bool hasoid = false;
|
bool hasoid = false;
|
||||||
TupleDesc tupDesc;
|
TupleDesc tupDesc;
|
||||||
|
@ -479,7 +479,7 @@ ExecAssignResultTypeFromTL(PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
TupleDesc
|
TupleDesc
|
||||||
ExecGetResultType(PlanState * planstate)
|
ExecGetResultType(PlanState *planstate)
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
|
TupleTableSlot *slot = planstate->ps_ResultTupleSlot;
|
||||||
|
|
||||||
|
@ -525,7 +525,7 @@ ExecBuildProjectionInfo(List *targetList,
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignProjectionInfo(PlanState * planstate)
|
ExecAssignProjectionInfo(PlanState *planstate)
|
||||||
{
|
{
|
||||||
planstate->ps_ProjInfo =
|
planstate->ps_ProjInfo =
|
||||||
ExecBuildProjectionInfo(planstate->targetlist,
|
ExecBuildProjectionInfo(planstate->targetlist,
|
||||||
|
@ -544,7 +544,7 @@ ExecAssignProjectionInfo(PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecFreeExprContext(PlanState * planstate)
|
ExecFreeExprContext(PlanState *planstate)
|
||||||
{
|
{
|
||||||
ExprContext *econtext;
|
ExprContext *econtext;
|
||||||
|
|
||||||
|
@ -576,7 +576,7 @@ ExecFreeExprContext(PlanState * planstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
TupleDesc
|
TupleDesc
|
||||||
ExecGetScanType(ScanState * scanstate)
|
ExecGetScanType(ScanState *scanstate)
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
|
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
|
||||||
|
|
||||||
|
@ -588,7 +588,7 @@ ExecGetScanType(ScanState * scanstate)
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignScanType(ScanState * scanstate,
|
ExecAssignScanType(ScanState *scanstate,
|
||||||
TupleDesc tupDesc, bool shouldFree)
|
TupleDesc tupDesc, bool shouldFree)
|
||||||
{
|
{
|
||||||
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
|
TupleTableSlot *slot = scanstate->ss_ScanTupleSlot;
|
||||||
|
@ -601,7 +601,7 @@ ExecAssignScanType(ScanState * scanstate,
|
||||||
* ----------------
|
* ----------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecAssignScanTypeFromOuterPlan(ScanState * scanstate)
|
ExecAssignScanTypeFromOuterPlan(ScanState *scanstate)
|
||||||
{
|
{
|
||||||
PlanState *outerPlan;
|
PlanState *outerPlan;
|
||||||
TupleDesc tupDesc;
|
TupleDesc tupDesc;
|
||||||
|
@ -879,7 +879,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
|
||||||
* Add changed parameters to a plan node's chgParam set
|
* Add changed parameters to a plan node's chgParam set
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
UpdateChangedParamSet(PlanState * node, Bitmapset * newchg)
|
UpdateChangedParamSet(PlanState *node, Bitmapset *newchg)
|
||||||
{
|
{
|
||||||
Bitmapset *parmset;
|
Bitmapset *parmset;
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.114 2003/08/04 02:39:58 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeAgg.c,v 1.115 2003/08/08 21:41:41 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -173,7 +173,7 @@ typedef struct AggStatePerGroupData
|
||||||
* later input value. Only the first non-NULL input will be
|
* later input value. Only the first non-NULL input will be
|
||||||
* auto-substituted.
|
* auto-substituted.
|
||||||
*/
|
*/
|
||||||
} AggStatePerGroupData;
|
} AggStatePerGroupData;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To implement hashed aggregation, we need a hashtable that stores a
|
* To implement hashed aggregation, we need a hashtable that stores a
|
||||||
|
@ -188,7 +188,7 @@ typedef struct AggHashEntryData
|
||||||
TupleHashEntryData shared; /* common header for hash table entries */
|
TupleHashEntryData shared; /* common header for hash table entries */
|
||||||
/* per-aggregate transition status array - must be last! */
|
/* per-aggregate transition status array - must be last! */
|
||||||
AggStatePerGroupData pergroup[1]; /* VARIABLE LENGTH ARRAY */
|
AggStatePerGroupData pergroup[1]; /* VARIABLE LENGTH ARRAY */
|
||||||
} AggHashEntryData; /* VARIABLE LENGTH STRUCT */
|
} AggHashEntryData; /* VARIABLE LENGTH STRUCT */
|
||||||
|
|
||||||
|
|
||||||
static void initialize_aggregates(AggState *aggstate,
|
static void initialize_aggregates(AggState *aggstate,
|
||||||
|
@ -579,7 +579,7 @@ build_hash_table(AggState *aggstate)
|
||||||
Assert(node->numGroups > 0);
|
Assert(node->numGroups > 0);
|
||||||
|
|
||||||
entrysize = sizeof(AggHashEntryData) +
|
entrysize = sizeof(AggHashEntryData) +
|
||||||
(aggstate->numaggs - 1) * sizeof(AggStatePerGroupData);
|
(aggstate->numaggs - 1) *sizeof(AggStatePerGroupData);
|
||||||
|
|
||||||
aggstate->hashtable = BuildTupleHashTable(node->numCols,
|
aggstate->hashtable = BuildTupleHashTable(node->numCols,
|
||||||
node->grpColIdx,
|
node->grpColIdx,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.55 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.56 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
|
|
||||||
|
|
||||||
static TupleTableSlot *ExecHashJoinOuterGetTuple(PlanState * node,
|
static TupleTableSlot *ExecHashJoinOuterGetTuple(PlanState *node,
|
||||||
HashJoinState *hjstate);
|
HashJoinState *hjstate);
|
||||||
static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
|
static TupleTableSlot *ExecHashJoinGetSavedTuple(HashJoinState *hjstate,
|
||||||
BufFile *file,
|
BufFile *file,
|
||||||
|
@ -499,7 +499,7 @@ ExecEndHashJoin(HashJoinState *node)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static TupleTableSlot *
|
static TupleTableSlot *
|
||||||
ExecHashJoinOuterGetTuple(PlanState * node, HashJoinState *hjstate)
|
ExecHashJoinOuterGetTuple(PlanState *node, HashJoinState *hjstate)
|
||||||
{
|
{
|
||||||
HashJoinTable hashtable = hjstate->hj_HashTable;
|
HashJoinTable hashtable = hjstate->hj_HashTable;
|
||||||
int curbatch = hashtable->curbatch;
|
int curbatch = hashtable->curbatch;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.60 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.61 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -102,7 +102,7 @@ static bool MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
MJFormSkipQuals(List *qualList, List **ltQuals, List **gtQuals,
|
MJFormSkipQuals(List *qualList, List **ltQuals, List **gtQuals,
|
||||||
PlanState * parent)
|
PlanState *parent)
|
||||||
{
|
{
|
||||||
List *ltexprs,
|
List *ltexprs,
|
||||||
*gtexprs,
|
*gtexprs,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.45 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.46 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -29,8 +29,8 @@
|
||||||
#include "executor/nodeSeqscan.h"
|
#include "executor/nodeSeqscan.h"
|
||||||
#include "parser/parsetree.h"
|
#include "parser/parsetree.h"
|
||||||
|
|
||||||
static void InitScanRelation(SeqScanState * node, EState *estate);
|
static void InitScanRelation(SeqScanState *node, EState *estate);
|
||||||
static TupleTableSlot *SeqNext(SeqScanState * node);
|
static TupleTableSlot *SeqNext(SeqScanState *node);
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
* Scan Support
|
* Scan Support
|
||||||
|
@ -43,7 +43,7 @@ static TupleTableSlot *SeqNext(SeqScanState * node);
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static TupleTableSlot *
|
static TupleTableSlot *
|
||||||
SeqNext(SeqScanState * node)
|
SeqNext(SeqScanState *node)
|
||||||
{
|
{
|
||||||
HeapTuple tuple;
|
HeapTuple tuple;
|
||||||
HeapScanDesc scandesc;
|
HeapScanDesc scandesc;
|
||||||
|
@ -123,7 +123,7 @@ SeqNext(SeqScanState * node)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
TupleTableSlot *
|
TupleTableSlot *
|
||||||
ExecSeqScan(SeqScanState * node)
|
ExecSeqScan(SeqScanState *node)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* use SeqNext as access method
|
* use SeqNext as access method
|
||||||
|
@ -139,7 +139,7 @@ ExecSeqScan(SeqScanState * node)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
InitScanRelation(SeqScanState * node, EState *estate)
|
InitScanRelation(SeqScanState *node, EState *estate)
|
||||||
{
|
{
|
||||||
Index relid;
|
Index relid;
|
||||||
List *rangeTable;
|
List *rangeTable;
|
||||||
|
@ -252,7 +252,7 @@ ExecCountSlotsSeqScan(SeqScan *node)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndSeqScan(SeqScanState * node)
|
ExecEndSeqScan(SeqScanState *node)
|
||||||
{
|
{
|
||||||
Relation relation;
|
Relation relation;
|
||||||
HeapScanDesc scanDesc;
|
HeapScanDesc scanDesc;
|
||||||
|
@ -302,7 +302,7 @@ ExecEndSeqScan(SeqScanState * node)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecSeqReScan(SeqScanState * node, ExprContext *exprCtxt)
|
ExecSeqReScan(SeqScanState *node, ExprContext *exprCtxt)
|
||||||
{
|
{
|
||||||
EState *estate;
|
EState *estate;
|
||||||
Index scanrelid;
|
Index scanrelid;
|
||||||
|
@ -332,7 +332,7 @@ ExecSeqReScan(SeqScanState * node, ExprContext *exprCtxt)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecSeqMarkPos(SeqScanState * node)
|
ExecSeqMarkPos(SeqScanState *node)
|
||||||
{
|
{
|
||||||
HeapScanDesc scan;
|
HeapScanDesc scan;
|
||||||
|
|
||||||
|
@ -347,7 +347,7 @@ ExecSeqMarkPos(SeqScanState * node)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecSeqRestrPos(SeqScanState * node)
|
ExecSeqRestrPos(SeqScanState *node)
|
||||||
{
|
{
|
||||||
HeapScanDesc scan;
|
HeapScanDesc scan;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.53 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/nodeSubplan.c,v 1.54 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -29,13 +29,13 @@
|
||||||
#include "utils/lsyscache.h"
|
#include "utils/lsyscache.h"
|
||||||
|
|
||||||
|
|
||||||
static Datum ExecHashSubPlan(SubPlanState * node,
|
static Datum ExecHashSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static Datum ExecScanSubPlan(SubPlanState * node,
|
static Datum ExecScanSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
static void buildSubPlanHash(SubPlanState * node);
|
static void buildSubPlanHash(SubPlanState *node);
|
||||||
static bool findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot);
|
static bool findPartialMatch(TupleHashTable hashtable, TupleTableSlot *slot);
|
||||||
static bool tupleAllNulls(HeapTuple tuple);
|
static bool tupleAllNulls(HeapTuple tuple);
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ static bool tupleAllNulls(HeapTuple tuple);
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
ExecSubPlan(SubPlanState * node,
|
ExecSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ ExecSubPlan(SubPlanState * node,
|
||||||
* ExecHashSubPlan: store subselect result in an in-memory hash table
|
* ExecHashSubPlan: store subselect result in an in-memory hash table
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecHashSubPlan(SubPlanState * node,
|
ExecHashSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
|
@ -194,7 +194,7 @@ ExecHashSubPlan(SubPlanState * node,
|
||||||
* ExecScanSubPlan: default case where we have to rescan subplan each time
|
* ExecScanSubPlan: default case where we have to rescan subplan each time
|
||||||
*/
|
*/
|
||||||
static Datum
|
static Datum
|
||||||
ExecScanSubPlan(SubPlanState * node,
|
ExecScanSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull)
|
bool *isNull)
|
||||||
{
|
{
|
||||||
|
@ -461,7 +461,7 @@ ExecScanSubPlan(SubPlanState * node,
|
||||||
* buildSubPlanHash: load hash table by scanning subplan output.
|
* buildSubPlanHash: load hash table by scanning subplan output.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
buildSubPlanHash(SubPlanState * node)
|
buildSubPlanHash(SubPlanState *node)
|
||||||
{
|
{
|
||||||
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
||||||
PlanState *planstate = node->planstate;
|
PlanState *planstate = node->planstate;
|
||||||
|
@ -663,7 +663,7 @@ tupleAllNulls(HeapTuple tuple)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecInitSubPlan(SubPlanState * node, EState *estate)
|
ExecInitSubPlan(SubPlanState *node, EState *estate)
|
||||||
{
|
{
|
||||||
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
||||||
EState *sp_estate;
|
EState *sp_estate;
|
||||||
|
@ -899,7 +899,7 @@ ExecInitSubPlan(SubPlanState * node, EState *estate)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecSetParamPlan(SubPlanState * node, ExprContext *econtext)
|
ExecSetParamPlan(SubPlanState *node, ExprContext *econtext)
|
||||||
{
|
{
|
||||||
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
||||||
PlanState *planstate = node->planstate;
|
PlanState *planstate = node->planstate;
|
||||||
|
@ -1041,7 +1041,7 @@ ExecSetParamPlan(SubPlanState * node, ExprContext *econtext)
|
||||||
* ----------------------------------------------------------------
|
* ----------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecEndSubPlan(SubPlanState * node)
|
ExecEndSubPlan(SubPlanState *node)
|
||||||
{
|
{
|
||||||
if (node->needShutdown)
|
if (node->needShutdown)
|
||||||
{
|
{
|
||||||
|
@ -1061,7 +1061,7 @@ ExecEndSubPlan(SubPlanState * node)
|
||||||
* Mark an initplan as needing recalculation
|
* Mark an initplan as needing recalculation
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
ExecReScanSetParamPlan(SubPlanState * node, PlanState * parent)
|
ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent)
|
||||||
{
|
{
|
||||||
PlanState *planstate = node->planstate;
|
PlanState *planstate = node->planstate;
|
||||||
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
SubPlan *subplan = (SubPlan *) node->xprstate.expr;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.102 2003/08/08 19:18:21 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/spi.c,v 1.103 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1263,7 +1263,7 @@ static void
|
||||||
_SPI_cursor_operation(Portal portal, bool forward, int count,
|
_SPI_cursor_operation(Portal portal, bool forward, int count,
|
||||||
DestReceiver *dest)
|
DestReceiver *dest)
|
||||||
{
|
{
|
||||||
long nfetched;
|
long nfetched;
|
||||||
|
|
||||||
/* Check that the portal is valid */
|
/* Check that the portal is valid */
|
||||||
if (!PortalIsValid(portal))
|
if (!PortalIsValid(portal))
|
||||||
|
@ -1288,9 +1288,10 @@ _SPI_cursor_operation(Portal portal, bool forward, int count,
|
||||||
* Think not to combine this store with the preceding function call.
|
* Think not to combine this store with the preceding function call.
|
||||||
* If the portal contains calls to functions that use SPI, then
|
* If the portal contains calls to functions that use SPI, then
|
||||||
* SPI_stack is likely to move around while the portal runs. When
|
* SPI_stack is likely to move around while the portal runs. When
|
||||||
* control returns, _SPI_current will point to the correct stack entry...
|
* control returns, _SPI_current will point to the correct stack
|
||||||
* but the pointer may be different than it was beforehand. So we must
|
* entry... but the pointer may be different than it was beforehand.
|
||||||
* be sure to re-fetch the pointer after the function call completes.
|
* So we must be sure to re-fetch the pointer after the function call
|
||||||
|
* completes.
|
||||||
*/
|
*/
|
||||||
_SPI_current->processed = nfetched;
|
_SPI_current->processed = nfetched;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/executor/tstoreReceiver.c,v 1.9 2003/08/06 17:46:45 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/executor/tstoreReceiver.c,v 1.10 2003/08/08 21:41:42 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -24,7 +24,7 @@ typedef struct
|
||||||
DestReceiver pub;
|
DestReceiver pub;
|
||||||
Tuplestorestate *tstore;
|
Tuplestorestate *tstore;
|
||||||
MemoryContext cxt;
|
MemoryContext cxt;
|
||||||
} TStoreState;
|
} TStoreState;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/bitmapset.c,v 1.4 2003/08/04 00:43:18 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/bitmapset.c,v 1.5 2003/08/08 21:41:43 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,7 @@ static const uint8 number_of_ones[256] = {
|
||||||
* bms_copy - make a palloc'd copy of a bitmapset
|
* bms_copy - make a palloc'd copy of a bitmapset
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_copy(const Bitmapset * a)
|
bms_copy(const Bitmapset *a)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
@ -127,7 +127,7 @@ bms_copy(const Bitmapset * a)
|
||||||
* be reported as equal to a palloc'd value containing no members.
|
* be reported as equal to a palloc'd value containing no members.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_equal(const Bitmapset * a, const Bitmapset * b)
|
bms_equal(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
const Bitmapset *shorter;
|
const Bitmapset *shorter;
|
||||||
const Bitmapset *longer;
|
const Bitmapset *longer;
|
||||||
|
@ -197,7 +197,7 @@ bms_make_singleton(int x)
|
||||||
* Same as pfree except for allowing NULL input
|
* Same as pfree except for allowing NULL input
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
bms_free(Bitmapset * a)
|
bms_free(Bitmapset *a)
|
||||||
{
|
{
|
||||||
if (a)
|
if (a)
|
||||||
pfree(a);
|
pfree(a);
|
||||||
|
@ -214,7 +214,7 @@ bms_free(Bitmapset * a)
|
||||||
* bms_union - set union
|
* bms_union - set union
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_union(const Bitmapset * a, const Bitmapset * b)
|
bms_union(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
const Bitmapset *other;
|
const Bitmapset *other;
|
||||||
|
@ -248,7 +248,7 @@ bms_union(const Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_intersect - set intersection
|
* bms_intersect - set intersection
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_intersect(const Bitmapset * a, const Bitmapset * b)
|
bms_intersect(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
const Bitmapset *other;
|
const Bitmapset *other;
|
||||||
|
@ -280,7 +280,7 @@ bms_intersect(const Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_difference - set difference (ie, A without members of B)
|
* bms_difference - set difference (ie, A without members of B)
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_difference(const Bitmapset * a, const Bitmapset * b)
|
bms_difference(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
int shortlen;
|
int shortlen;
|
||||||
|
@ -304,7 +304,7 @@ bms_difference(const Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_is_subset - is A a subset of B?
|
* bms_is_subset - is A a subset of B?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_is_subset(const Bitmapset * a, const Bitmapset * b)
|
bms_is_subset(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
int shortlen;
|
int shortlen;
|
||||||
int longlen;
|
int longlen;
|
||||||
|
@ -339,7 +339,7 @@ bms_is_subset(const Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_is_member - is X a member of A?
|
* bms_is_member - is X a member of A?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_is_member(int x, const Bitmapset * a)
|
bms_is_member(int x, const Bitmapset *a)
|
||||||
{
|
{
|
||||||
int wordnum,
|
int wordnum,
|
||||||
bitnum;
|
bitnum;
|
||||||
|
@ -362,7 +362,7 @@ bms_is_member(int x, const Bitmapset * a)
|
||||||
* bms_overlap - do sets overlap (ie, have a nonempty intersection)?
|
* bms_overlap - do sets overlap (ie, have a nonempty intersection)?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_overlap(const Bitmapset * a, const Bitmapset * b)
|
bms_overlap(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
int shortlen;
|
int shortlen;
|
||||||
int i;
|
int i;
|
||||||
|
@ -384,7 +384,7 @@ bms_overlap(const Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_nonempty_difference - do sets have a nonempty difference?
|
* bms_nonempty_difference - do sets have a nonempty difference?
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_nonempty_difference(const Bitmapset * a, const Bitmapset * b)
|
bms_nonempty_difference(const Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
int shortlen;
|
int shortlen;
|
||||||
int i;
|
int i;
|
||||||
|
@ -416,7 +416,7 @@ bms_nonempty_difference(const Bitmapset * a, const Bitmapset * b)
|
||||||
* Raises error if |a| is not 1.
|
* Raises error if |a| is not 1.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bms_singleton_member(const Bitmapset * a)
|
bms_singleton_member(const Bitmapset *a)
|
||||||
{
|
{
|
||||||
int result = -1;
|
int result = -1;
|
||||||
int nwords;
|
int nwords;
|
||||||
|
@ -451,7 +451,7 @@ bms_singleton_member(const Bitmapset * a)
|
||||||
* bms_num_members - count members of set
|
* bms_num_members - count members of set
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bms_num_members(const Bitmapset * a)
|
bms_num_members(const Bitmapset *a)
|
||||||
{
|
{
|
||||||
int result = 0;
|
int result = 0;
|
||||||
int nwords;
|
int nwords;
|
||||||
|
@ -480,7 +480,7 @@ bms_num_members(const Bitmapset * a)
|
||||||
* This is faster than making an exact count with bms_num_members().
|
* This is faster than making an exact count with bms_num_members().
|
||||||
*/
|
*/
|
||||||
BMS_Membership
|
BMS_Membership
|
||||||
bms_membership(const Bitmapset * a)
|
bms_membership(const Bitmapset *a)
|
||||||
{
|
{
|
||||||
BMS_Membership result = BMS_EMPTY_SET;
|
BMS_Membership result = BMS_EMPTY_SET;
|
||||||
int nwords;
|
int nwords;
|
||||||
|
@ -509,7 +509,7 @@ bms_membership(const Bitmapset * a)
|
||||||
* This is even faster than bms_membership().
|
* This is even faster than bms_membership().
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
bms_is_empty(const Bitmapset * a)
|
bms_is_empty(const Bitmapset *a)
|
||||||
{
|
{
|
||||||
int nwords;
|
int nwords;
|
||||||
int wordnum;
|
int wordnum;
|
||||||
|
@ -544,7 +544,7 @@ bms_is_empty(const Bitmapset * a)
|
||||||
* Input set is modified or recycled!
|
* Input set is modified or recycled!
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_add_member(Bitmapset * a, int x)
|
bms_add_member(Bitmapset *a, int x)
|
||||||
{
|
{
|
||||||
int wordnum,
|
int wordnum,
|
||||||
bitnum;
|
bitnum;
|
||||||
|
@ -582,7 +582,7 @@ bms_add_member(Bitmapset * a, int x)
|
||||||
* Input set is modified in-place!
|
* Input set is modified in-place!
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_del_member(Bitmapset * a, int x)
|
bms_del_member(Bitmapset *a, int x)
|
||||||
{
|
{
|
||||||
int wordnum,
|
int wordnum,
|
||||||
bitnum;
|
bitnum;
|
||||||
|
@ -602,7 +602,7 @@ bms_del_member(Bitmapset * a, int x)
|
||||||
* bms_add_members - like bms_union, but left input is recycled
|
* bms_add_members - like bms_union, but left input is recycled
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_add_members(Bitmapset * a, const Bitmapset * b)
|
bms_add_members(Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
const Bitmapset *other;
|
const Bitmapset *other;
|
||||||
|
@ -638,7 +638,7 @@ bms_add_members(Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_int_members - like bms_intersect, but left input is recycled
|
* bms_int_members - like bms_intersect, but left input is recycled
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_int_members(Bitmapset * a, const Bitmapset * b)
|
bms_int_members(Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
int shortlen;
|
int shortlen;
|
||||||
int i;
|
int i;
|
||||||
|
@ -664,7 +664,7 @@ bms_int_members(Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_del_members - like bms_difference, but left input is recycled
|
* bms_del_members - like bms_difference, but left input is recycled
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_del_members(Bitmapset * a, const Bitmapset * b)
|
bms_del_members(Bitmapset *a, const Bitmapset *b)
|
||||||
{
|
{
|
||||||
int shortlen;
|
int shortlen;
|
||||||
int i;
|
int i;
|
||||||
|
@ -685,7 +685,7 @@ bms_del_members(Bitmapset * a, const Bitmapset * b)
|
||||||
* bms_join - like bms_union, but *both* inputs are recycled
|
* bms_join - like bms_union, but *both* inputs are recycled
|
||||||
*/
|
*/
|
||||||
Bitmapset *
|
Bitmapset *
|
||||||
bms_join(Bitmapset * a, Bitmapset * b)
|
bms_join(Bitmapset *a, Bitmapset *b)
|
||||||
{
|
{
|
||||||
Bitmapset *result;
|
Bitmapset *result;
|
||||||
Bitmapset *other;
|
Bitmapset *other;
|
||||||
|
@ -732,7 +732,7 @@ bms_join(Bitmapset * a, Bitmapset * b)
|
||||||
*----------
|
*----------
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
bms_first_member(Bitmapset * a)
|
bms_first_member(Bitmapset *a)
|
||||||
{
|
{
|
||||||
int nwords;
|
int nwords;
|
||||||
int wordnum;
|
int wordnum;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.262 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.263 2003/08/08 21:41:43 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -755,7 +755,7 @@ _copyArrayRef(ArrayRef *from)
|
||||||
* _copyFuncExpr
|
* _copyFuncExpr
|
||||||
*/
|
*/
|
||||||
static FuncExpr *
|
static FuncExpr *
|
||||||
_copyFuncExpr(FuncExpr * from)
|
_copyFuncExpr(FuncExpr *from)
|
||||||
{
|
{
|
||||||
FuncExpr *newnode = makeNode(FuncExpr);
|
FuncExpr *newnode = makeNode(FuncExpr);
|
||||||
|
|
||||||
|
@ -772,7 +772,7 @@ _copyFuncExpr(FuncExpr * from)
|
||||||
* _copyOpExpr
|
* _copyOpExpr
|
||||||
*/
|
*/
|
||||||
static OpExpr *
|
static OpExpr *
|
||||||
_copyOpExpr(OpExpr * from)
|
_copyOpExpr(OpExpr *from)
|
||||||
{
|
{
|
||||||
OpExpr *newnode = makeNode(OpExpr);
|
OpExpr *newnode = makeNode(OpExpr);
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ _copyOpExpr(OpExpr * from)
|
||||||
* _copyDistinctExpr (same as OpExpr)
|
* _copyDistinctExpr (same as OpExpr)
|
||||||
*/
|
*/
|
||||||
static DistinctExpr *
|
static DistinctExpr *
|
||||||
_copyDistinctExpr(DistinctExpr * from)
|
_copyDistinctExpr(DistinctExpr *from)
|
||||||
{
|
{
|
||||||
DistinctExpr *newnode = makeNode(DistinctExpr);
|
DistinctExpr *newnode = makeNode(DistinctExpr);
|
||||||
|
|
||||||
|
@ -806,7 +806,7 @@ _copyDistinctExpr(DistinctExpr * from)
|
||||||
* _copyScalarArrayOpExpr
|
* _copyScalarArrayOpExpr
|
||||||
*/
|
*/
|
||||||
static ScalarArrayOpExpr *
|
static ScalarArrayOpExpr *
|
||||||
_copyScalarArrayOpExpr(ScalarArrayOpExpr * from)
|
_copyScalarArrayOpExpr(ScalarArrayOpExpr *from)
|
||||||
{
|
{
|
||||||
ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
|
ScalarArrayOpExpr *newnode = makeNode(ScalarArrayOpExpr);
|
||||||
|
|
||||||
|
@ -822,7 +822,7 @@ _copyScalarArrayOpExpr(ScalarArrayOpExpr * from)
|
||||||
* _copyBoolExpr
|
* _copyBoolExpr
|
||||||
*/
|
*/
|
||||||
static BoolExpr *
|
static BoolExpr *
|
||||||
_copyBoolExpr(BoolExpr * from)
|
_copyBoolExpr(BoolExpr *from)
|
||||||
{
|
{
|
||||||
BoolExpr *newnode = makeNode(BoolExpr);
|
BoolExpr *newnode = makeNode(BoolExpr);
|
||||||
|
|
||||||
|
@ -940,7 +940,7 @@ _copyCaseWhen(CaseWhen *from)
|
||||||
* _copyArrayExpr
|
* _copyArrayExpr
|
||||||
*/
|
*/
|
||||||
static ArrayExpr *
|
static ArrayExpr *
|
||||||
_copyArrayExpr(ArrayExpr * from)
|
_copyArrayExpr(ArrayExpr *from)
|
||||||
{
|
{
|
||||||
ArrayExpr *newnode = makeNode(ArrayExpr);
|
ArrayExpr *newnode = makeNode(ArrayExpr);
|
||||||
|
|
||||||
|
@ -956,7 +956,7 @@ _copyArrayExpr(ArrayExpr * from)
|
||||||
* _copyCoalesceExpr
|
* _copyCoalesceExpr
|
||||||
*/
|
*/
|
||||||
static CoalesceExpr *
|
static CoalesceExpr *
|
||||||
_copyCoalesceExpr(CoalesceExpr * from)
|
_copyCoalesceExpr(CoalesceExpr *from)
|
||||||
{
|
{
|
||||||
CoalesceExpr *newnode = makeNode(CoalesceExpr);
|
CoalesceExpr *newnode = makeNode(CoalesceExpr);
|
||||||
|
|
||||||
|
@ -970,7 +970,7 @@ _copyCoalesceExpr(CoalesceExpr * from)
|
||||||
* _copyNullIfExpr (same as OpExpr)
|
* _copyNullIfExpr (same as OpExpr)
|
||||||
*/
|
*/
|
||||||
static NullIfExpr *
|
static NullIfExpr *
|
||||||
_copyNullIfExpr(NullIfExpr * from)
|
_copyNullIfExpr(NullIfExpr *from)
|
||||||
{
|
{
|
||||||
NullIfExpr *newnode = makeNode(NullIfExpr);
|
NullIfExpr *newnode = makeNode(NullIfExpr);
|
||||||
|
|
||||||
|
@ -1015,7 +1015,7 @@ _copyBooleanTest(BooleanTest *from)
|
||||||
* _copyCoerceToDomain
|
* _copyCoerceToDomain
|
||||||
*/
|
*/
|
||||||
static CoerceToDomain *
|
static CoerceToDomain *
|
||||||
_copyCoerceToDomain(CoerceToDomain * from)
|
_copyCoerceToDomain(CoerceToDomain *from)
|
||||||
{
|
{
|
||||||
CoerceToDomain *newnode = makeNode(CoerceToDomain);
|
CoerceToDomain *newnode = makeNode(CoerceToDomain);
|
||||||
|
|
||||||
|
@ -1031,7 +1031,7 @@ _copyCoerceToDomain(CoerceToDomain * from)
|
||||||
* _copyCoerceToDomainValue
|
* _copyCoerceToDomainValue
|
||||||
*/
|
*/
|
||||||
static CoerceToDomainValue *
|
static CoerceToDomainValue *
|
||||||
_copyCoerceToDomainValue(CoerceToDomainValue * from)
|
_copyCoerceToDomainValue(CoerceToDomainValue *from)
|
||||||
{
|
{
|
||||||
CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
|
CoerceToDomainValue *newnode = makeNode(CoerceToDomainValue);
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ _copyCoerceToDomainValue(CoerceToDomainValue * from)
|
||||||
* _copySetToDefault
|
* _copySetToDefault
|
||||||
*/
|
*/
|
||||||
static SetToDefault *
|
static SetToDefault *
|
||||||
_copySetToDefault(SetToDefault * from)
|
_copySetToDefault(SetToDefault *from)
|
||||||
{
|
{
|
||||||
SetToDefault *newnode = makeNode(SetToDefault);
|
SetToDefault *newnode = makeNode(SetToDefault);
|
||||||
|
|
||||||
|
@ -1191,7 +1191,7 @@ _copyJoinInfo(JoinInfo *from)
|
||||||
* _copyInClauseInfo
|
* _copyInClauseInfo
|
||||||
*/
|
*/
|
||||||
static InClauseInfo *
|
static InClauseInfo *
|
||||||
_copyInClauseInfo(InClauseInfo * from)
|
_copyInClauseInfo(InClauseInfo *from)
|
||||||
{
|
{
|
||||||
InClauseInfo *newnode = makeNode(InClauseInfo);
|
InClauseInfo *newnode = makeNode(InClauseInfo);
|
||||||
|
|
||||||
|
@ -1633,7 +1633,7 @@ _copyAlterTableStmt(AlterTableStmt *from)
|
||||||
}
|
}
|
||||||
|
|
||||||
static AlterDomainStmt *
|
static AlterDomainStmt *
|
||||||
_copyAlterDomainStmt(AlterDomainStmt * from)
|
_copyAlterDomainStmt(AlterDomainStmt *from)
|
||||||
{
|
{
|
||||||
AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
|
AlterDomainStmt *newnode = makeNode(AlterDomainStmt);
|
||||||
|
|
||||||
|
@ -1685,7 +1685,7 @@ _copyFuncWithArgs(FuncWithArgs *from)
|
||||||
}
|
}
|
||||||
|
|
||||||
static DeclareCursorStmt *
|
static DeclareCursorStmt *
|
||||||
_copyDeclareCursorStmt(DeclareCursorStmt * from)
|
_copyDeclareCursorStmt(DeclareCursorStmt *from)
|
||||||
{
|
{
|
||||||
DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
|
DeclareCursorStmt *newnode = makeNode(DeclareCursorStmt);
|
||||||
|
|
||||||
|
@ -1747,7 +1747,7 @@ _copyCreateStmt(CreateStmt *from)
|
||||||
}
|
}
|
||||||
|
|
||||||
static InhRelation *
|
static InhRelation *
|
||||||
_copyInhRelation(InhRelation * from)
|
_copyInhRelation(InhRelation *from)
|
||||||
{
|
{
|
||||||
InhRelation *newnode = makeNode(InhRelation);
|
InhRelation *newnode = makeNode(InhRelation);
|
||||||
|
|
||||||
|
@ -2118,7 +2118,7 @@ _copyCreateSeqStmt(CreateSeqStmt *from)
|
||||||
}
|
}
|
||||||
|
|
||||||
static AlterSeqStmt *
|
static AlterSeqStmt *
|
||||||
_copyAlterSeqStmt(AlterSeqStmt * from)
|
_copyAlterSeqStmt(AlterSeqStmt *from)
|
||||||
{
|
{
|
||||||
AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
|
AlterSeqStmt *newnode = makeNode(AlterSeqStmt);
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.206 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/equalfuncs.c,v 1.207 2003/08/08 21:41:43 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -224,7 +224,7 @@ _equalArrayRef(ArrayRef *a, ArrayRef *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalFuncExpr(FuncExpr * a, FuncExpr * b)
|
_equalFuncExpr(FuncExpr *a, FuncExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(funcid);
|
COMPARE_SCALAR_FIELD(funcid);
|
||||||
COMPARE_SCALAR_FIELD(funcresulttype);
|
COMPARE_SCALAR_FIELD(funcresulttype);
|
||||||
|
@ -245,7 +245,7 @@ _equalFuncExpr(FuncExpr * a, FuncExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalOpExpr(OpExpr * a, OpExpr * b)
|
_equalOpExpr(OpExpr *a, OpExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(opno);
|
COMPARE_SCALAR_FIELD(opno);
|
||||||
|
|
||||||
|
@ -268,7 +268,7 @@ _equalOpExpr(OpExpr * a, OpExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalDistinctExpr(DistinctExpr * a, DistinctExpr * b)
|
_equalDistinctExpr(DistinctExpr *a, DistinctExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(opno);
|
COMPARE_SCALAR_FIELD(opno);
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ _equalDistinctExpr(DistinctExpr * a, DistinctExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalScalarArrayOpExpr(ScalarArrayOpExpr * a, ScalarArrayOpExpr * b)
|
_equalScalarArrayOpExpr(ScalarArrayOpExpr *a, ScalarArrayOpExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(opno);
|
COMPARE_SCALAR_FIELD(opno);
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ _equalScalarArrayOpExpr(ScalarArrayOpExpr * a, ScalarArrayOpExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalBoolExpr(BoolExpr * a, BoolExpr * b)
|
_equalBoolExpr(BoolExpr *a, BoolExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(boolop);
|
COMPARE_SCALAR_FIELD(boolop);
|
||||||
COMPARE_NODE_FIELD(args);
|
COMPARE_NODE_FIELD(args);
|
||||||
|
@ -404,7 +404,7 @@ _equalCaseWhen(CaseWhen *a, CaseWhen *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalArrayExpr(ArrayExpr * a, ArrayExpr * b)
|
_equalArrayExpr(ArrayExpr *a, ArrayExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(array_typeid);
|
COMPARE_SCALAR_FIELD(array_typeid);
|
||||||
COMPARE_SCALAR_FIELD(element_typeid);
|
COMPARE_SCALAR_FIELD(element_typeid);
|
||||||
|
@ -415,7 +415,7 @@ _equalArrayExpr(ArrayExpr * a, ArrayExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalCoalesceExpr(CoalesceExpr * a, CoalesceExpr * b)
|
_equalCoalesceExpr(CoalesceExpr *a, CoalesceExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(coalescetype);
|
COMPARE_SCALAR_FIELD(coalescetype);
|
||||||
COMPARE_NODE_FIELD(args);
|
COMPARE_NODE_FIELD(args);
|
||||||
|
@ -424,7 +424,7 @@ _equalCoalesceExpr(CoalesceExpr * a, CoalesceExpr * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalNullIfExpr(NullIfExpr * a, NullIfExpr * b)
|
_equalNullIfExpr(NullIfExpr *a, NullIfExpr *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(opno);
|
COMPARE_SCALAR_FIELD(opno);
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ _equalBooleanTest(BooleanTest *a, BooleanTest *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalCoerceToDomain(CoerceToDomain * a, CoerceToDomain * b)
|
_equalCoerceToDomain(CoerceToDomain *a, CoerceToDomain *b)
|
||||||
{
|
{
|
||||||
COMPARE_NODE_FIELD(arg);
|
COMPARE_NODE_FIELD(arg);
|
||||||
COMPARE_SCALAR_FIELD(resulttype);
|
COMPARE_SCALAR_FIELD(resulttype);
|
||||||
|
@ -484,7 +484,7 @@ _equalCoerceToDomain(CoerceToDomain * a, CoerceToDomain * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalCoerceToDomainValue(CoerceToDomainValue * a, CoerceToDomainValue * b)
|
_equalCoerceToDomainValue(CoerceToDomainValue *a, CoerceToDomainValue *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(typeId);
|
COMPARE_SCALAR_FIELD(typeId);
|
||||||
COMPARE_SCALAR_FIELD(typeMod);
|
COMPARE_SCALAR_FIELD(typeMod);
|
||||||
|
@ -493,7 +493,7 @@ _equalCoerceToDomainValue(CoerceToDomainValue * a, CoerceToDomainValue * b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalSetToDefault(SetToDefault * a, SetToDefault * b)
|
_equalSetToDefault(SetToDefault *a, SetToDefault *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(typeId);
|
COMPARE_SCALAR_FIELD(typeId);
|
||||||
COMPARE_SCALAR_FIELD(typeMod);
|
COMPARE_SCALAR_FIELD(typeMod);
|
||||||
|
@ -587,7 +587,7 @@ _equalJoinInfo(JoinInfo *a, JoinInfo *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalInClauseInfo(InClauseInfo * a, InClauseInfo * b)
|
_equalInClauseInfo(InClauseInfo *a, InClauseInfo *b)
|
||||||
{
|
{
|
||||||
COMPARE_BITMAPSET_FIELD(lefthand);
|
COMPARE_BITMAPSET_FIELD(lefthand);
|
||||||
COMPARE_BITMAPSET_FIELD(righthand);
|
COMPARE_BITMAPSET_FIELD(righthand);
|
||||||
|
@ -715,7 +715,7 @@ _equalAlterTableStmt(AlterTableStmt *a, AlterTableStmt *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalAlterDomainStmt(AlterDomainStmt * a, AlterDomainStmt * b)
|
_equalAlterDomainStmt(AlterDomainStmt *a, AlterDomainStmt *b)
|
||||||
{
|
{
|
||||||
COMPARE_SCALAR_FIELD(subtype);
|
COMPARE_SCALAR_FIELD(subtype);
|
||||||
COMPARE_NODE_FIELD(typename);
|
COMPARE_NODE_FIELD(typename);
|
||||||
|
@ -759,7 +759,7 @@ _equalFuncWithArgs(FuncWithArgs *a, FuncWithArgs *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalDeclareCursorStmt(DeclareCursorStmt * a, DeclareCursorStmt * b)
|
_equalDeclareCursorStmt(DeclareCursorStmt *a, DeclareCursorStmt *b)
|
||||||
{
|
{
|
||||||
COMPARE_STRING_FIELD(portalname);
|
COMPARE_STRING_FIELD(portalname);
|
||||||
COMPARE_SCALAR_FIELD(options);
|
COMPARE_SCALAR_FIELD(options);
|
||||||
|
@ -811,7 +811,7 @@ _equalCreateStmt(CreateStmt *a, CreateStmt *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalInhRelation(InhRelation * a, InhRelation * b)
|
_equalInhRelation(InhRelation *a, InhRelation *b)
|
||||||
{
|
{
|
||||||
COMPARE_NODE_FIELD(relation);
|
COMPARE_NODE_FIELD(relation);
|
||||||
COMPARE_SCALAR_FIELD(including_defaults);
|
COMPARE_SCALAR_FIELD(including_defaults);
|
||||||
|
@ -1122,7 +1122,7 @@ _equalCreateSeqStmt(CreateSeqStmt *a, CreateSeqStmt *b)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
_equalAlterSeqStmt(AlterSeqStmt * a, AlterSeqStmt * b)
|
_equalAlterSeqStmt(AlterSeqStmt *a, AlterSeqStmt *b)
|
||||||
{
|
{
|
||||||
COMPARE_NODE_FIELD(sequence);
|
COMPARE_NODE_FIELD(sequence);
|
||||||
COMPARE_NODE_FIELD(options);
|
COMPARE_NODE_FIELD(options);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.53 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.54 2003/08/08 21:41:44 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* XXX a few of the following functions are duplicated to handle
|
* XXX a few of the following functions are duplicated to handle
|
||||||
|
@ -202,7 +202,7 @@ nconc(List *l1, List *l2)
|
||||||
* since we avoid having to chase down the list again each time.
|
* since we avoid having to chase down the list again each time.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FastAppend(FastList * fl, void *datum)
|
FastAppend(FastList *fl, void *datum)
|
||||||
{
|
{
|
||||||
List *cell = makeList1(datum);
|
List *cell = makeList1(datum);
|
||||||
|
|
||||||
|
@ -223,7 +223,7 @@ FastAppend(FastList * fl, void *datum)
|
||||||
* FastAppendi - same for integers
|
* FastAppendi - same for integers
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FastAppendi(FastList * fl, int datum)
|
FastAppendi(FastList *fl, int datum)
|
||||||
{
|
{
|
||||||
List *cell = makeListi1(datum);
|
List *cell = makeListi1(datum);
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ FastAppendi(FastList * fl, int datum)
|
||||||
* FastAppendo - same for Oids
|
* FastAppendo - same for Oids
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FastAppendo(FastList * fl, Oid datum)
|
FastAppendo(FastList *fl, Oid datum)
|
||||||
{
|
{
|
||||||
List *cell = makeListo1(datum);
|
List *cell = makeListo1(datum);
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ FastAppendo(FastList * fl, Oid datum)
|
||||||
* Note that the cells of the second argument are absorbed into the FastList.
|
* Note that the cells of the second argument are absorbed into the FastList.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FastConc(FastList * fl, List *cells)
|
FastConc(FastList *fl, List *cells)
|
||||||
{
|
{
|
||||||
if (cells == NIL)
|
if (cells == NIL)
|
||||||
return; /* nothing to do */
|
return; /* nothing to do */
|
||||||
|
@ -290,7 +290,7 @@ FastConc(FastList * fl, List *cells)
|
||||||
* Note that the cells of the second argument are absorbed into the first.
|
* Note that the cells of the second argument are absorbed into the first.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
FastConcFast(FastList * fl, FastList * fl2)
|
FastConcFast(FastList *fl, FastList *fl2)
|
||||||
{
|
{
|
||||||
if (fl2->head == NIL)
|
if (fl2->head == NIL)
|
||||||
return; /* nothing to do */
|
return; /* nothing to do */
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.216 2003/08/04 02:39:59 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.217 2003/08/08 21:41:44 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* Every node type that can appear in stored rules' parsetrees *must*
|
* Every node type that can appear in stored rules' parsetrees *must*
|
||||||
|
@ -184,7 +184,7 @@ _outOidList(StringInfo str, List *list)
|
||||||
* an integer List would be.
|
* an integer List would be.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_outBitmapset(StringInfo str, Bitmapset * bms)
|
_outBitmapset(StringInfo str, Bitmapset *bms)
|
||||||
{
|
{
|
||||||
Bitmapset *tmpset;
|
Bitmapset *tmpset;
|
||||||
int x;
|
int x;
|
||||||
|
@ -631,7 +631,7 @@ _outArrayRef(StringInfo str, ArrayRef *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outFuncExpr(StringInfo str, FuncExpr * node)
|
_outFuncExpr(StringInfo str, FuncExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("FUNCEXPR");
|
WRITE_NODE_TYPE("FUNCEXPR");
|
||||||
|
|
||||||
|
@ -643,7 +643,7 @@ _outFuncExpr(StringInfo str, FuncExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outOpExpr(StringInfo str, OpExpr * node)
|
_outOpExpr(StringInfo str, OpExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("OPEXPR");
|
WRITE_NODE_TYPE("OPEXPR");
|
||||||
|
|
||||||
|
@ -655,7 +655,7 @@ _outOpExpr(StringInfo str, OpExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outDistinctExpr(StringInfo str, DistinctExpr * node)
|
_outDistinctExpr(StringInfo str, DistinctExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("DISTINCTEXPR");
|
WRITE_NODE_TYPE("DISTINCTEXPR");
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ _outDistinctExpr(StringInfo str, DistinctExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outScalarArrayOpExpr(StringInfo str, ScalarArrayOpExpr * node)
|
_outScalarArrayOpExpr(StringInfo str, ScalarArrayOpExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("SCALARARRAYOPEXPR");
|
WRITE_NODE_TYPE("SCALARARRAYOPEXPR");
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ _outScalarArrayOpExpr(StringInfo str, ScalarArrayOpExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outBoolExpr(StringInfo str, BoolExpr * node)
|
_outBoolExpr(StringInfo str, BoolExpr *node)
|
||||||
{
|
{
|
||||||
char *opstr = NULL;
|
char *opstr = NULL;
|
||||||
|
|
||||||
|
@ -778,7 +778,7 @@ _outCaseWhen(StringInfo str, CaseWhen *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outArrayExpr(StringInfo str, ArrayExpr * node)
|
_outArrayExpr(StringInfo str, ArrayExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("ARRAY");
|
WRITE_NODE_TYPE("ARRAY");
|
||||||
|
|
||||||
|
@ -789,7 +789,7 @@ _outArrayExpr(StringInfo str, ArrayExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outCoalesceExpr(StringInfo str, CoalesceExpr * node)
|
_outCoalesceExpr(StringInfo str, CoalesceExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("COALESCE");
|
WRITE_NODE_TYPE("COALESCE");
|
||||||
|
|
||||||
|
@ -798,7 +798,7 @@ _outCoalesceExpr(StringInfo str, CoalesceExpr * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outNullIfExpr(StringInfo str, NullIfExpr * node)
|
_outNullIfExpr(StringInfo str, NullIfExpr *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("NULLIFEXPR");
|
WRITE_NODE_TYPE("NULLIFEXPR");
|
||||||
|
|
||||||
|
@ -828,7 +828,7 @@ _outBooleanTest(StringInfo str, BooleanTest *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outCoerceToDomain(StringInfo str, CoerceToDomain * node)
|
_outCoerceToDomain(StringInfo str, CoerceToDomain *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("COERCETODOMAIN");
|
WRITE_NODE_TYPE("COERCETODOMAIN");
|
||||||
|
|
||||||
|
@ -839,7 +839,7 @@ _outCoerceToDomain(StringInfo str, CoerceToDomain * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outCoerceToDomainValue(StringInfo str, CoerceToDomainValue * node)
|
_outCoerceToDomainValue(StringInfo str, CoerceToDomainValue *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("COERCETODOMAINVALUE");
|
WRITE_NODE_TYPE("COERCETODOMAINVALUE");
|
||||||
|
|
||||||
|
@ -848,7 +848,7 @@ _outCoerceToDomainValue(StringInfo str, CoerceToDomainValue * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outSetToDefault(StringInfo str, SetToDefault * node)
|
_outSetToDefault(StringInfo str, SetToDefault *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("SETTODEFAULT");
|
WRITE_NODE_TYPE("SETTODEFAULT");
|
||||||
|
|
||||||
|
@ -977,7 +977,7 @@ _outAppendPath(StringInfo str, AppendPath *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outResultPath(StringInfo str, ResultPath * node)
|
_outResultPath(StringInfo str, ResultPath *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("RESULTPATH");
|
WRITE_NODE_TYPE("RESULTPATH");
|
||||||
|
|
||||||
|
@ -988,7 +988,7 @@ _outResultPath(StringInfo str, ResultPath * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outMaterialPath(StringInfo str, MaterialPath * node)
|
_outMaterialPath(StringInfo str, MaterialPath *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("MATERIALPATH");
|
WRITE_NODE_TYPE("MATERIALPATH");
|
||||||
|
|
||||||
|
@ -998,7 +998,7 @@ _outMaterialPath(StringInfo str, MaterialPath * node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outUniquePath(StringInfo str, UniquePath * node)
|
_outUniquePath(StringInfo str, UniquePath *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("UNIQUEPATH");
|
WRITE_NODE_TYPE("UNIQUEPATH");
|
||||||
|
|
||||||
|
@ -1077,7 +1077,7 @@ _outJoinInfo(StringInfo str, JoinInfo *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outInClauseInfo(StringInfo str, InClauseInfo * node)
|
_outInClauseInfo(StringInfo str, InClauseInfo *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("INCLAUSEINFO");
|
WRITE_NODE_TYPE("INCLAUSEINFO");
|
||||||
|
|
||||||
|
@ -1130,7 +1130,7 @@ _outNotifyStmt(StringInfo str, NotifyStmt *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outDeclareCursorStmt(StringInfo str, DeclareCursorStmt * node)
|
_outDeclareCursorStmt(StringInfo str, DeclareCursorStmt *node)
|
||||||
{
|
{
|
||||||
WRITE_NODE_TYPE("DECLARECURSOR");
|
WRITE_NODE_TYPE("DECLARECURSOR");
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.113 2003/08/04 02:40:00 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.114 2003/08/08 21:41:44 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -103,7 +103,7 @@ bool enable_hashjoin = true;
|
||||||
|
|
||||||
static Selectivity estimate_hash_bucketsize(Query *root, Var *var,
|
static Selectivity estimate_hash_bucketsize(Query *root, Var *var,
|
||||||
int nbuckets);
|
int nbuckets);
|
||||||
static bool cost_qual_eval_walker(Node *node, QualCost * total);
|
static bool cost_qual_eval_walker(Node *node, QualCost *total);
|
||||||
static Selectivity approx_selectivity(Query *root, List *quals,
|
static Selectivity approx_selectivity(Query *root, List *quals,
|
||||||
JoinType jointype);
|
JoinType jointype);
|
||||||
static void set_rel_width(Query *root, RelOptInfo *rel);
|
static void set_rel_width(Query *root, RelOptInfo *rel);
|
||||||
|
@ -1449,7 +1449,7 @@ estimate_hash_bucketsize(Query *root, Var *var, int nbuckets)
|
||||||
* and a per-evaluation component.
|
* and a per-evaluation component.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cost_qual_eval(QualCost * cost, List *quals)
|
cost_qual_eval(QualCost *cost, List *quals)
|
||||||
{
|
{
|
||||||
List *l;
|
List *l;
|
||||||
|
|
||||||
|
@ -1491,7 +1491,7 @@ cost_qual_eval(QualCost * cost, List *quals)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
cost_qual_eval_walker(Node *node, QualCost * total)
|
cost_qual_eval_walker(Node *node, QualCost *total)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.16 2003/08/04 02:40:00 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/tidpath.c,v 1.17 2003/08/08 21:41:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
static List *TidqualFromRestrictinfo(Relids relids, List *restrictinfo);
|
static List *TidqualFromRestrictinfo(Relids relids, List *restrictinfo);
|
||||||
static bool isEvaluable(int varno, Node *node);
|
static bool isEvaluable(int varno, Node *node);
|
||||||
static Node *TidequalClause(int varno, OpExpr * node);
|
static Node *TidequalClause(int varno, OpExpr *node);
|
||||||
static List *TidqualFromExpr(int varno, Expr *expr);
|
static List *TidqualFromExpr(int varno, Expr *expr);
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@ -66,7 +66,7 @@ isEvaluable(int varno, Node *node)
|
||||||
* or the left node if the opclause is ....=CTID
|
* or the left node if the opclause is ....=CTID
|
||||||
*/
|
*/
|
||||||
static Node *
|
static Node *
|
||||||
TidequalClause(int varno, OpExpr * node)
|
TidequalClause(int varno, OpExpr *node)
|
||||||
{
|
{
|
||||||
Node *rnode = NULL,
|
Node *rnode = NULL,
|
||||||
*arg1,
|
*arg1,
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.152 2003/08/07 19:20:22 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.153 2003/08/08 21:41:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -40,9 +40,9 @@ static bool use_physical_tlist(RelOptInfo *rel);
|
||||||
static void disuse_physical_tlist(Plan *plan, Path *path);
|
static void disuse_physical_tlist(Plan *plan, Path *path);
|
||||||
static Join *create_join_plan(Query *root, JoinPath *best_path);
|
static Join *create_join_plan(Query *root, JoinPath *best_path);
|
||||||
static Append *create_append_plan(Query *root, AppendPath *best_path);
|
static Append *create_append_plan(Query *root, AppendPath *best_path);
|
||||||
static Result *create_result_plan(Query *root, ResultPath * best_path);
|
static Result *create_result_plan(Query *root, ResultPath *best_path);
|
||||||
static Material *create_material_plan(Query *root, MaterialPath * best_path);
|
static Material *create_material_plan(Query *root, MaterialPath *best_path);
|
||||||
static Plan *create_unique_plan(Query *root, UniquePath * best_path);
|
static Plan *create_unique_plan(Query *root, UniquePath *best_path);
|
||||||
static SeqScan *create_seqscan_plan(Path *best_path, List *tlist,
|
static SeqScan *create_seqscan_plan(Path *best_path, List *tlist,
|
||||||
List *scan_clauses);
|
List *scan_clauses);
|
||||||
static IndexScan *create_indexscan_plan(Query *root, IndexPath *best_path,
|
static IndexScan *create_indexscan_plan(Query *root, IndexPath *best_path,
|
||||||
|
@ -443,7 +443,7 @@ create_append_plan(Query *root, AppendPath *best_path)
|
||||||
* Returns a Plan node.
|
* Returns a Plan node.
|
||||||
*/
|
*/
|
||||||
static Result *
|
static Result *
|
||||||
create_result_plan(Query *root, ResultPath * best_path)
|
create_result_plan(Query *root, ResultPath *best_path)
|
||||||
{
|
{
|
||||||
Result *plan;
|
Result *plan;
|
||||||
List *tlist;
|
List *tlist;
|
||||||
|
@ -475,7 +475,7 @@ create_result_plan(Query *root, ResultPath * best_path)
|
||||||
* Returns a Plan node.
|
* Returns a Plan node.
|
||||||
*/
|
*/
|
||||||
static Material *
|
static Material *
|
||||||
create_material_plan(Query *root, MaterialPath * best_path)
|
create_material_plan(Query *root, MaterialPath *best_path)
|
||||||
{
|
{
|
||||||
Material *plan;
|
Material *plan;
|
||||||
Plan *subplan;
|
Plan *subplan;
|
||||||
|
@ -500,7 +500,7 @@ create_material_plan(Query *root, MaterialPath * best_path)
|
||||||
* Returns a Plan node.
|
* Returns a Plan node.
|
||||||
*/
|
*/
|
||||||
static Plan *
|
static Plan *
|
||||||
create_unique_plan(Query *root, UniquePath * best_path)
|
create_unique_plan(Query *root, UniquePath *best_path)
|
||||||
{
|
{
|
||||||
Plan *plan;
|
Plan *plan;
|
||||||
Plan *subplan;
|
Plan *subplan;
|
||||||
|
@ -522,17 +522,18 @@ create_unique_plan(Query *root, UniquePath * best_path)
|
||||||
* to unique-ify may be expressions in these variables. We have to
|
* to unique-ify may be expressions in these variables. We have to
|
||||||
* add any such expressions to the subplan's tlist. We then build
|
* add any such expressions to the subplan's tlist. We then build
|
||||||
* control information showing which subplan output columns are to be
|
* control information showing which subplan output columns are to be
|
||||||
* examined by the grouping step. (Since we do not remove any existing
|
* examined by the grouping step. (Since we do not remove any
|
||||||
* subplan outputs, not all the output columns may be used for grouping.)
|
* existing subplan outputs, not all the output columns may be used
|
||||||
|
* for grouping.)
|
||||||
*
|
*
|
||||||
* Note: the reason we don't remove any subplan outputs is that there
|
* Note: the reason we don't remove any subplan outputs is that there are
|
||||||
* are scenarios where a Var is needed at higher levels even though it
|
* scenarios where a Var is needed at higher levels even though it is
|
||||||
* is not one of the nominal outputs of an IN clause. Consider
|
* not one of the nominal outputs of an IN clause. Consider WHERE x
|
||||||
* WHERE x IN (SELECT y FROM t1,t2 WHERE y = z)
|
* IN (SELECT y FROM t1,t2 WHERE y = z) Implied equality deduction
|
||||||
* Implied equality deduction will generate an "x = z" clause, which may
|
* will generate an "x = z" clause, which may get used instead of "x =
|
||||||
* get used instead of "x = y" in the upper join step. Therefore the
|
* y" in the upper join step. Therefore the sub-select had better
|
||||||
* sub-select had better deliver both y and z in its targetlist. It is
|
* deliver both y and z in its targetlist. It is sufficient to
|
||||||
* sufficient to unique-ify on y, however.
|
* unique-ify on y, however.
|
||||||
*
|
*
|
||||||
* To find the correct list of values to unique-ify, we look in the
|
* To find the correct list of values to unique-ify, we look in the
|
||||||
* information saved for IN expressions. If this code is ever used in
|
* information saved for IN expressions. If this code is ever used in
|
||||||
|
@ -1208,7 +1209,7 @@ fix_indxqual_sublist(List *indexqual,
|
||||||
Relids leftvarnos;
|
Relids leftvarnos;
|
||||||
Oid opclass;
|
Oid opclass;
|
||||||
|
|
||||||
if (!IsA(clause, OpExpr) || length(clause->args) != 2)
|
if (!IsA(clause, OpExpr) ||length(clause->args) != 2)
|
||||||
elog(ERROR, "indexqual clause is not binary opclause");
|
elog(ERROR, "indexqual clause is not binary opclause");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.96 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.97 2003/08/08 21:41:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +60,7 @@ static Node *replace_vars_with_subplan_refs(Node *node,
|
||||||
static Node *replace_vars_with_subplan_refs_mutator(Node *node,
|
static Node *replace_vars_with_subplan_refs_mutator(Node *node,
|
||||||
replace_vars_with_subplan_refs_context *context);
|
replace_vars_with_subplan_refs_context *context);
|
||||||
static bool fix_opfuncids_walker(Node *node, void *context);
|
static bool fix_opfuncids_walker(Node *node, void *context);
|
||||||
static void set_sa_opfuncid(ScalarArrayOpExpr * opexpr);
|
static void set_sa_opfuncid(ScalarArrayOpExpr *opexpr);
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -759,7 +759,7 @@ fix_opfuncids_walker(Node *node, void *context)
|
||||||
* DistinctExpr and NullIfExpr nodes.
|
* DistinctExpr and NullIfExpr nodes.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
set_opfuncid(OpExpr * opexpr)
|
set_opfuncid(OpExpr *opexpr)
|
||||||
{
|
{
|
||||||
if (opexpr->opfuncid == InvalidOid)
|
if (opexpr->opfuncid == InvalidOid)
|
||||||
opexpr->opfuncid = get_opcode(opexpr->opno);
|
opexpr->opfuncid = get_opcode(opexpr->opno);
|
||||||
|
@ -770,7 +770,7 @@ set_opfuncid(OpExpr * opexpr)
|
||||||
* As above, for ScalarArrayOpExpr nodes.
|
* As above, for ScalarArrayOpExpr nodes.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
set_sa_opfuncid(ScalarArrayOpExpr * opexpr)
|
set_sa_opfuncid(ScalarArrayOpExpr *opexpr)
|
||||||
{
|
{
|
||||||
if (opexpr->opfuncid == InvalidOid)
|
if (opexpr->opfuncid == InvalidOid)
|
||||||
opexpr->opfuncid = get_opcode(opexpr->opno);
|
opexpr->opfuncid = get_opcode(opexpr->opno);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.81 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/subselect.c,v 1.82 2003/08/08 21:41:51 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -71,14 +71,14 @@ typedef struct PlannerParamItem
|
||||||
{
|
{
|
||||||
Node *item; /* the Var, Aggref, or Param */
|
Node *item; /* the Var, Aggref, or Param */
|
||||||
Index abslevel; /* its absolute query level */
|
Index abslevel; /* its absolute query level */
|
||||||
} PlannerParamItem;
|
} PlannerParamItem;
|
||||||
|
|
||||||
|
|
||||||
typedef struct finalize_primnode_context
|
typedef struct finalize_primnode_context
|
||||||
{
|
{
|
||||||
Bitmapset *paramids; /* Set of PARAM_EXEC paramids found */
|
Bitmapset *paramids; /* Set of PARAM_EXEC paramids found */
|
||||||
Bitmapset *outer_params; /* Set of accessible outer paramids */
|
Bitmapset *outer_params; /* Set of accessible outer paramids */
|
||||||
} finalize_primnode_context;
|
} finalize_primnode_context;
|
||||||
|
|
||||||
|
|
||||||
static List *convert_sublink_opers(List *lefthand, List *operOids,
|
static List *convert_sublink_opers(List *lefthand, List *operOids,
|
||||||
|
@ -88,9 +88,9 @@ static bool subplan_is_hashable(SubLink *slink, SubPlan *node);
|
||||||
static Node *replace_correlation_vars_mutator(Node *node, void *context);
|
static Node *replace_correlation_vars_mutator(Node *node, void *context);
|
||||||
static Node *process_sublinks_mutator(Node *node, bool *isTopQual);
|
static Node *process_sublinks_mutator(Node *node, bool *isTopQual);
|
||||||
static Bitmapset *finalize_plan(Plan *plan, List *rtable,
|
static Bitmapset *finalize_plan(Plan *plan, List *rtable,
|
||||||
Bitmapset * outer_params,
|
Bitmapset *outer_params,
|
||||||
Bitmapset * valid_params);
|
Bitmapset *valid_params);
|
||||||
static bool finalize_primnode(Node *node, finalize_primnode_context * context);
|
static bool finalize_primnode(Node *node, finalize_primnode_context *context);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -909,7 +909,7 @@ SS_finalize_plan(Plan *plan, List *rtable)
|
||||||
*/
|
*/
|
||||||
static Bitmapset *
|
static Bitmapset *
|
||||||
finalize_plan(Plan *plan, List *rtable,
|
finalize_plan(Plan *plan, List *rtable,
|
||||||
Bitmapset * outer_params, Bitmapset * valid_params)
|
Bitmapset *outer_params, Bitmapset *valid_params)
|
||||||
{
|
{
|
||||||
finalize_primnode_context context;
|
finalize_primnode_context context;
|
||||||
List *lst;
|
List *lst;
|
||||||
|
@ -1073,7 +1073,7 @@ finalize_plan(Plan *plan, List *rtable,
|
||||||
* expression tree to the result set.
|
* expression tree to the result set.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
finalize_primnode(Node *node, finalize_primnode_context * context)
|
finalize_primnode(Node *node, finalize_primnode_context *context)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.10 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepjointree.c,v 1.11 2003/08/08 21:41:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -41,14 +41,14 @@ typedef struct reduce_outer_joins_state
|
||||||
Relids relids; /* base relids within this subtree */
|
Relids relids; /* base relids within this subtree */
|
||||||
bool contains_outer; /* does subtree contain outer join(s)? */
|
bool contains_outer; /* does subtree contain outer join(s)? */
|
||||||
List *sub_states; /* List of states for subtree components */
|
List *sub_states; /* List of states for subtree components */
|
||||||
} reduce_outer_joins_state;
|
} reduce_outer_joins_state;
|
||||||
|
|
||||||
static bool is_simple_subquery(Query *subquery);
|
static bool is_simple_subquery(Query *subquery);
|
||||||
static bool has_nullable_targetlist(Query *subquery);
|
static bool has_nullable_targetlist(Query *subquery);
|
||||||
static void resolvenew_in_jointree(Node *jtnode, int varno, List *subtlist);
|
static void resolvenew_in_jointree(Node *jtnode, int varno, List *subtlist);
|
||||||
static reduce_outer_joins_state *reduce_outer_joins_pass1(Node *jtnode);
|
static reduce_outer_joins_state *reduce_outer_joins_pass1(Node *jtnode);
|
||||||
static void reduce_outer_joins_pass2(Node *jtnode,
|
static void reduce_outer_joins_pass2(Node *jtnode,
|
||||||
reduce_outer_joins_state * state,
|
reduce_outer_joins_state *state,
|
||||||
Query *parse,
|
Query *parse,
|
||||||
Relids nonnullable_rels);
|
Relids nonnullable_rels);
|
||||||
static Relids find_nonnullable_rels(Node *node, bool top_level);
|
static Relids find_nonnullable_rels(Node *node, bool top_level);
|
||||||
|
@ -609,7 +609,7 @@ reduce_outer_joins_pass1(Node *jtnode)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
reduce_outer_joins_pass2(Node *jtnode,
|
reduce_outer_joins_pass2(Node *jtnode,
|
||||||
reduce_outer_joins_state * state,
|
reduce_outer_joins_state *state,
|
||||||
Query *parse,
|
Query *parse,
|
||||||
Relids nonnullable_rels)
|
Relids nonnullable_rels)
|
||||||
{
|
{
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.37 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.38 2003/08/08 21:41:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -21,12 +21,12 @@
|
||||||
#include "utils/lsyscache.h"
|
#include "utils/lsyscache.h"
|
||||||
|
|
||||||
static Expr *flatten_andors(Expr *qual);
|
static Expr *flatten_andors(Expr *qual);
|
||||||
static void flatten_andors_and_walker(FastList * out_list, List *andlist);
|
static void flatten_andors_and_walker(FastList *out_list, List *andlist);
|
||||||
static void flatten_andors_or_walker(FastList * out_list, List *orlist);
|
static void flatten_andors_or_walker(FastList *out_list, List *orlist);
|
||||||
static List *pull_ands(List *andlist);
|
static List *pull_ands(List *andlist);
|
||||||
static void pull_ands_walker(FastList * out_list, List *andlist);
|
static void pull_ands_walker(FastList *out_list, List *andlist);
|
||||||
static List *pull_ors(List *orlist);
|
static List *pull_ors(List *orlist);
|
||||||
static void pull_ors_walker(FastList * out_list, List *orlist);
|
static void pull_ors_walker(FastList *out_list, List *orlist);
|
||||||
static Expr *find_nots(Expr *qual);
|
static Expr *find_nots(Expr *qual);
|
||||||
static Expr *push_nots(Expr *qual);
|
static Expr *push_nots(Expr *qual);
|
||||||
static Expr *find_ors(Expr *qual);
|
static Expr *find_ors(Expr *qual);
|
||||||
|
@ -328,7 +328,7 @@ flatten_andors(Expr *qual)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
flatten_andors_and_walker(FastList * out_list, List *andlist)
|
flatten_andors_and_walker(FastList *out_list, List *andlist)
|
||||||
{
|
{
|
||||||
List *arg;
|
List *arg;
|
||||||
|
|
||||||
|
@ -344,7 +344,7 @@ flatten_andors_and_walker(FastList * out_list, List *andlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
flatten_andors_or_walker(FastList * out_list, List *orlist)
|
flatten_andors_or_walker(FastList *out_list, List *orlist)
|
||||||
{
|
{
|
||||||
List *arg;
|
List *arg;
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ pull_ands(List *andlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pull_ands_walker(FastList * out_list, List *andlist)
|
pull_ands_walker(FastList *out_list, List *andlist)
|
||||||
{
|
{
|
||||||
List *arg;
|
List *arg;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ pull_ors(List *orlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pull_ors_walker(FastList * out_list, List *orlist)
|
pull_ors_walker(FastList *out_list, List *orlist)
|
||||||
{
|
{
|
||||||
List *arg;
|
List *arg;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.151 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.152 2003/08/08 21:41:55 momjian Exp $
|
||||||
*
|
*
|
||||||
* HISTORY
|
* HISTORY
|
||||||
* AUTHOR DATE MAJOR EVENT
|
* AUTHOR DATE MAJOR EVENT
|
||||||
|
@ -50,7 +50,7 @@ typedef struct
|
||||||
int nargs;
|
int nargs;
|
||||||
List *args;
|
List *args;
|
||||||
int *usecounts;
|
int *usecounts;
|
||||||
} substitute_actual_parameters_context;
|
} substitute_actual_parameters_context;
|
||||||
|
|
||||||
static bool contain_agg_clause_walker(Node *node, void *context);
|
static bool contain_agg_clause_walker(Node *node, void *context);
|
||||||
static bool contain_distinct_agg_clause_walker(Node *node, void *context);
|
static bool contain_distinct_agg_clause_walker(Node *node, void *context);
|
||||||
|
@ -70,7 +70,7 @@ static Expr *inline_function(Oid funcid, Oid result_type, List *args,
|
||||||
static Node *substitute_actual_parameters(Node *expr, int nargs, List *args,
|
static Node *substitute_actual_parameters(Node *expr, int nargs, List *args,
|
||||||
int *usecounts);
|
int *usecounts);
|
||||||
static Node *substitute_actual_parameters_mutator(Node *node,
|
static Node *substitute_actual_parameters_mutator(Node *node,
|
||||||
substitute_actual_parameters_context * context);
|
substitute_actual_parameters_context *context);
|
||||||
static void sql_inline_error_callback(void *arg);
|
static void sql_inline_error_callback(void *arg);
|
||||||
static Expr *evaluate_expr(Expr *expr, Oid result_type);
|
static Expr *evaluate_expr(Expr *expr, Oid result_type);
|
||||||
|
|
||||||
|
@ -981,7 +981,7 @@ NumRelids(Node *clause)
|
||||||
* XXX the clause is destructively modified!
|
* XXX the clause is destructively modified!
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
CommuteClause(OpExpr * clause)
|
CommuteClause(OpExpr *clause)
|
||||||
{
|
{
|
||||||
Oid opoid;
|
Oid opoid;
|
||||||
Node *temp;
|
Node *temp;
|
||||||
|
@ -2002,7 +2002,7 @@ substitute_actual_parameters(Node *expr, int nargs, List *args,
|
||||||
|
|
||||||
static Node *
|
static Node *
|
||||||
substitute_actual_parameters_mutator(Node *node,
|
substitute_actual_parameters_mutator(Node *node,
|
||||||
substitute_actual_parameters_context * context)
|
substitute_actual_parameters_context *context)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.53 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.54 2003/08/08 21:41:55 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -39,7 +39,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
int min_varlevel;
|
int min_varlevel;
|
||||||
int sublevels_up;
|
int sublevels_up;
|
||||||
} find_minimum_var_level_context;
|
} find_minimum_var_level_context;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ static bool contain_var_clause_walker(Node *node, void *context);
|
||||||
static bool contain_vars_of_level_walker(Node *node, int *sublevels_up);
|
static bool contain_vars_of_level_walker(Node *node, int *sublevels_up);
|
||||||
static bool contain_vars_above_level_walker(Node *node, int *sublevels_up);
|
static bool contain_vars_above_level_walker(Node *node, int *sublevels_up);
|
||||||
static bool find_minimum_var_level_walker(Node *node,
|
static bool find_minimum_var_level_walker(Node *node,
|
||||||
find_minimum_var_level_context * context);
|
find_minimum_var_level_context *context);
|
||||||
static bool pull_var_clause_walker(Node *node,
|
static bool pull_var_clause_walker(Node *node,
|
||||||
pull_var_clause_context *context);
|
pull_var_clause_context *context);
|
||||||
static Node *flatten_join_alias_vars_mutator(Node *node,
|
static Node *flatten_join_alias_vars_mutator(Node *node,
|
||||||
|
@ -364,7 +364,7 @@ find_minimum_var_level(Node *node)
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
find_minimum_var_level_walker(Node *node,
|
find_minimum_var_level_walker(Node *node,
|
||||||
find_minimum_var_level_context * context)
|
find_minimum_var_level_context *context)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.285 2003/08/04 02:40:01 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.286 2003/08/08 21:41:55 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -89,7 +89,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
Oid *paramTypes;
|
Oid *paramTypes;
|
||||||
int numParams;
|
int numParams;
|
||||||
} check_parameter_resolution_context;
|
} check_parameter_resolution_context;
|
||||||
|
|
||||||
|
|
||||||
static List *do_parse_analyze(Node *parseTree, ParseState *pstate);
|
static List *do_parse_analyze(Node *parseTree, ParseState *pstate);
|
||||||
|
@ -106,7 +106,7 @@ static Query *transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt);
|
||||||
static Node *transformSetOperationTree(ParseState *pstate, SelectStmt *stmt);
|
static Node *transformSetOperationTree(ParseState *pstate, SelectStmt *stmt);
|
||||||
static Query *transformUpdateStmt(ParseState *pstate, UpdateStmt *stmt);
|
static Query *transformUpdateStmt(ParseState *pstate, UpdateStmt *stmt);
|
||||||
static Query *transformDeclareCursorStmt(ParseState *pstate,
|
static Query *transformDeclareCursorStmt(ParseState *pstate,
|
||||||
DeclareCursorStmt * stmt);
|
DeclareCursorStmt *stmt);
|
||||||
static Query *transformPrepareStmt(ParseState *pstate, PrepareStmt *stmt);
|
static Query *transformPrepareStmt(ParseState *pstate, PrepareStmt *stmt);
|
||||||
static Query *transformExecuteStmt(ParseState *pstate, ExecuteStmt *stmt);
|
static Query *transformExecuteStmt(ParseState *pstate, ExecuteStmt *stmt);
|
||||||
static Query *transformCreateStmt(ParseState *pstate, CreateStmt *stmt,
|
static Query *transformCreateStmt(ParseState *pstate, CreateStmt *stmt,
|
||||||
|
@ -120,7 +120,7 @@ static void transformTableConstraint(ParseState *pstate,
|
||||||
CreateStmtContext *cxt,
|
CreateStmtContext *cxt,
|
||||||
Constraint *constraint);
|
Constraint *constraint);
|
||||||
static void transformInhRelation(ParseState *pstate, CreateStmtContext *cxt,
|
static void transformInhRelation(ParseState *pstate, CreateStmtContext *cxt,
|
||||||
InhRelation * inhrelation);
|
InhRelation *inhrelation);
|
||||||
static void transformIndexConstraints(ParseState *pstate,
|
static void transformIndexConstraints(ParseState *pstate,
|
||||||
CreateStmtContext *cxt);
|
CreateStmtContext *cxt);
|
||||||
static void transformFKConstraints(ParseState *pstate,
|
static void transformFKConstraints(ParseState *pstate,
|
||||||
|
@ -135,7 +135,7 @@ static bool relationHasPrimaryKey(Oid relationOid);
|
||||||
static void release_pstate_resources(ParseState *pstate);
|
static void release_pstate_resources(ParseState *pstate);
|
||||||
static FromExpr *makeFromExpr(List *fromlist, Node *quals);
|
static FromExpr *makeFromExpr(List *fromlist, Node *quals);
|
||||||
static bool check_parameter_resolution_walker(Node *node,
|
static bool check_parameter_resolution_walker(Node *node,
|
||||||
check_parameter_resolution_context * context);
|
check_parameter_resolution_context *context);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1171,7 +1171,7 @@ transformTableConstraint(ParseState *pstate, CreateStmtContext *cxt,
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
transformInhRelation(ParseState *pstate, CreateStmtContext *cxt,
|
transformInhRelation(ParseState *pstate, CreateStmtContext *cxt,
|
||||||
InhRelation * inhRelation)
|
InhRelation *inhRelation)
|
||||||
{
|
{
|
||||||
AttrNumber parent_attno;
|
AttrNumber parent_attno;
|
||||||
|
|
||||||
|
@ -1907,9 +1907,8 @@ transformRuleStmt(ParseState *pstate, RuleStmt *stmt,
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* If sub_qry is a setop, manipulating its jointree will
|
* If sub_qry is a setop, manipulating its jointree will
|
||||||
* do no good at all, because the jointree is dummy.
|
* do no good at all, because the jointree is dummy. (This
|
||||||
* (This should be a can't-happen case because of prior
|
* should be a can't-happen case because of prior tests.)
|
||||||
* tests.)
|
|
||||||
*/
|
*/
|
||||||
if (sub_qry->setOperations != NULL)
|
if (sub_qry->setOperations != NULL)
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
|
@ -2643,7 +2642,7 @@ transformAlterTableStmt(ParseState *pstate, AlterTableStmt *stmt,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Query *
|
static Query *
|
||||||
transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt * stmt)
|
transformDeclareCursorStmt(ParseState *pstate, DeclareCursorStmt *stmt)
|
||||||
{
|
{
|
||||||
Query *result = makeNode(Query);
|
Query *result = makeNode(Query);
|
||||||
List *extras_before = NIL,
|
List *extras_before = NIL,
|
||||||
|
@ -3200,7 +3199,7 @@ analyzeCreateSchemaStmt(CreateSchemaStmt *stmt)
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
check_parameter_resolution_walker(Node *node,
|
check_parameter_resolution_walker(Node *node,
|
||||||
check_parameter_resolution_context * context)
|
check_parameter_resolution_context *context)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regc_color.c,v 1.2 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regc_color.c,v 1.3 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Note that there are some incestuous relationships between this code and
|
* Note that there are some incestuous relationships between this code and
|
||||||
|
@ -144,7 +144,7 @@ cmtreefree(struct colormap * cm,
|
||||||
/*
|
/*
|
||||||
* setcolor - set the color of a character in a colormap
|
* setcolor - set the color of a character in a colormap
|
||||||
*/
|
*/
|
||||||
static color /* previous color */
|
static color /* previous color */
|
||||||
setcolor(struct colormap * cm,
|
setcolor(struct colormap * cm,
|
||||||
chr c,
|
chr c,
|
||||||
pcolor co)
|
pcolor co)
|
||||||
|
@ -218,7 +218,7 @@ maxcolor(struct colormap * cm)
|
||||||
* newcolor - find a new color (must be subject of setcolor at once)
|
* newcolor - find a new color (must be subject of setcolor at once)
|
||||||
* Beware: may relocate the colordescs.
|
* Beware: may relocate the colordescs.
|
||||||
*/
|
*/
|
||||||
static color /* COLORLESS for error */
|
static color /* COLORLESS for error */
|
||||||
newcolor(struct colormap * cm)
|
newcolor(struct colormap * cm)
|
||||||
{
|
{
|
||||||
struct colordesc *cd;
|
struct colordesc *cd;
|
||||||
|
@ -421,7 +421,7 @@ subrange(struct vars * v,
|
||||||
|
|
||||||
/* first, align "from" on a tree-block boundary */
|
/* first, align "from" on a tree-block boundary */
|
||||||
uf = (uchr) from;
|
uf = (uchr) from;
|
||||||
i = (int) (((uf + BYTTAB - 1) & (uchr) ~ BYTMASK) - uf);
|
i = (int) (((uf + BYTTAB - 1) & (uchr) ~BYTMASK) - uf);
|
||||||
for (; from <= to && i > 0; i--, from++)
|
for (; from <= to && i > 0; i--, from++)
|
||||||
newarc(v->nfa, PLAIN, subcolor(v->cm, from), lp, rp);
|
newarc(v->nfa, PLAIN, subcolor(v->cm, from), lp, rp);
|
||||||
if (from > to) /* didn't reach a boundary */
|
if (from > to) /* didn't reach a boundary */
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regc_cvec.c,v 1.2 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regc_cvec.c,v 1.3 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ newcvec(int nchrs, /* to hold this many chrs... */
|
||||||
if (cv == NULL)
|
if (cv == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
cv->chrspace = nchrs;
|
cv->chrspace = nchrs;
|
||||||
cv->chrs = (chr *) & cv->mcces[nmcces]; /* chrs just after MCCE
|
cv->chrs = (chr *) &cv->mcces[nmcces]; /* chrs just after MCCE
|
||||||
* ptrs */
|
* ptrs */
|
||||||
cv->mccespace = nmcces;
|
cv->mccespace = nmcces;
|
||||||
cv->ranges = cv->chrs + nchrs + nmcces * (MAXMCCE + 1);
|
cv->ranges = cv->chrs + nchrs + nmcces * (MAXMCCE + 1);
|
||||||
|
@ -71,7 +71,7 @@ clearcvec(struct cvec * cv)
|
||||||
|
|
||||||
assert(cv != NULL);
|
assert(cv != NULL);
|
||||||
cv->nchrs = 0;
|
cv->nchrs = 0;
|
||||||
assert(cv->chrs == (chr *) & cv->mcces[cv->mccespace]);
|
assert(cv->chrs == (chr *) &cv->mcces[cv->mccespace]);
|
||||||
cv->nmcces = 0;
|
cv->nmcces = 0;
|
||||||
cv->nmccechrs = 0;
|
cv->nmccechrs = 0;
|
||||||
cv->nranges = 0;
|
cv->nranges = 0;
|
||||||
|
@ -111,8 +111,8 @@ addrange(struct cvec * cv, /* character vector */
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
addmcce(struct cvec * cv, /* character vector */
|
addmcce(struct cvec * cv, /* character vector */
|
||||||
chr * startp, /* beginning of text */
|
chr *startp, /* beginning of text */
|
||||||
chr * endp) /* just past end of text */
|
chr *endp) /* just past end of text */
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regc_lex.c,v 1.2 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regc_lex.c,v 1.3 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -201,8 +201,8 @@ prefixes(struct vars * v)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
lexnest(struct vars * v,
|
lexnest(struct vars * v,
|
||||||
chr * beginp, /* start of interpolation */
|
chr *beginp, /* start of interpolation */
|
||||||
chr * endp) /* one past end of interpolation */
|
chr *endp) /* one past end of interpolation */
|
||||||
{
|
{
|
||||||
assert(v->savenow == NULL); /* only one level of nesting */
|
assert(v->savenow == NULL); /* only one level of nesting */
|
||||||
v->savenow = v->now;
|
v->savenow = v->now;
|
||||||
|
@ -876,7 +876,7 @@ lexescape(struct vars * v)
|
||||||
/*
|
/*
|
||||||
* lexdigits - slurp up digits and return chr value
|
* lexdigits - slurp up digits and return chr value
|
||||||
*/
|
*/
|
||||||
static chr /* chr value; errors signalled via ERR */
|
static chr /* chr value; errors signalled via ERR */
|
||||||
lexdigits(struct vars * v,
|
lexdigits(struct vars * v,
|
||||||
int base,
|
int base,
|
||||||
int minlen,
|
int minlen,
|
||||||
|
@ -1121,8 +1121,8 @@ newline(void)
|
||||||
*/
|
*/
|
||||||
static chr
|
static chr
|
||||||
chrnamed(struct vars * v,
|
chrnamed(struct vars * v,
|
||||||
chr * startp, /* start of name */
|
chr *startp, /* start of name */
|
||||||
chr * endp, /* just past end of name */
|
chr *endp, /* just past end of name */
|
||||||
chr lastresort) /* what to return if name lookup fails */
|
chr lastresort) /* what to return if name lookup fails */
|
||||||
{
|
{
|
||||||
celt c;
|
celt c;
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
* permission to use and distribute the software in accordance with the
|
* permission to use and distribute the software in accordance with the
|
||||||
* terms specified in this license.
|
* terms specified in this license.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regc_locale.c,v 1.2 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regc_locale.c,v 1.3 2003/08/08 21:41:56 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* ASCII character-name table */
|
/* ASCII character-name table */
|
||||||
|
@ -453,8 +453,8 @@ allmcces(struct vars * v, /* context */
|
||||||
*/
|
*/
|
||||||
static celt
|
static celt
|
||||||
element(struct vars * v, /* context */
|
element(struct vars * v, /* context */
|
||||||
chr * startp, /* points to start of name */
|
chr *startp, /* points to start of name */
|
||||||
chr * endp) /* points just past end of name */
|
chr *endp) /* points just past end of name */
|
||||||
{
|
{
|
||||||
struct cname *cn;
|
struct cname *cn;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
@ -593,8 +593,8 @@ eclass(struct vars * v, /* context */
|
||||||
*/
|
*/
|
||||||
static struct cvec *
|
static struct cvec *
|
||||||
cclass(struct vars * v, /* context */
|
cclass(struct vars * v, /* context */
|
||||||
chr * startp, /* where the name starts */
|
chr *startp, /* where the name starts */
|
||||||
chr * endp, /* just past the end of the name */
|
chr *endp, /* just past the end of the name */
|
||||||
int cases) /* case-independent? */
|
int cases) /* case-independent? */
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
|
@ -804,7 +804,7 @@ allcases(struct vars * v, /* context */
|
||||||
* stop at embedded NULs!
|
* stop at embedded NULs!
|
||||||
*/
|
*/
|
||||||
static int /* 0 for equal, nonzero for unequal */
|
static int /* 0 for equal, nonzero for unequal */
|
||||||
cmp(const chr * x, const chr * y, /* strings to compare */
|
cmp(const chr *x, const chr *y, /* strings to compare */
|
||||||
size_t len) /* exact length of comparison */
|
size_t len) /* exact length of comparison */
|
||||||
{
|
{
|
||||||
return memcmp(VS(x), VS(y), len * sizeof(chr));
|
return memcmp(VS(x), VS(y), len * sizeof(chr));
|
||||||
|
@ -819,7 +819,7 @@ cmp(const chr * x, const chr * y, /* strings to compare */
|
||||||
* stop at embedded NULs!
|
* stop at embedded NULs!
|
||||||
*/
|
*/
|
||||||
static int /* 0 for equal, nonzero for unequal */
|
static int /* 0 for equal, nonzero for unequal */
|
||||||
casecmp(const chr * x, const chr * y, /* strings to compare */
|
casecmp(const chr *x, const chr *y, /* strings to compare */
|
||||||
size_t len) /* exact length of comparison */
|
size_t len) /* exact length of comparison */
|
||||||
{
|
{
|
||||||
for (; len > 0; len--, x++, y++)
|
for (; len > 0; len--, x++, y++)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.37 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regcomp.c,v 1.38 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -293,7 +293,7 @@ static struct fns functions = {
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
pg_regcomp(regex_t *re,
|
pg_regcomp(regex_t *re,
|
||||||
const chr * string,
|
const chr *string,
|
||||||
size_t len,
|
size_t len,
|
||||||
int flags)
|
int flags)
|
||||||
{
|
{
|
||||||
|
@ -1052,8 +1052,8 @@ parseqatom(struct vars * v,
|
||||||
/*
|
/*
|
||||||
* prepare a general-purpose state skeleton
|
* prepare a general-purpose state skeleton
|
||||||
*
|
*
|
||||||
* ---> [s] ---prefix---> [begin] ---atom---> [end] ----rest---> [rp] /
|
* ---> [s] ---prefix---> [begin] ---atom---> [end] ----rest---> [rp] / /
|
||||||
* / [lp] ----> [s2] ----bypass---------------------
|
* [lp] ----> [s2] ----bypass---------------------
|
||||||
*
|
*
|
||||||
* where bypass is an empty, and prefix is some repetitions of atom
|
* where bypass is an empty, and prefix is some repetitions of atom
|
||||||
*/
|
*/
|
||||||
|
@ -1758,7 +1758,7 @@ dovec(struct vars * v,
|
||||||
/*
|
/*
|
||||||
* nextleader - find next MCCE leader within range
|
* nextleader - find next MCCE leader within range
|
||||||
*/
|
*/
|
||||||
static celt /* NOCELT means none */
|
static celt /* NOCELT means none */
|
||||||
nextleader(struct vars * v,
|
nextleader(struct vars * v,
|
||||||
chr from,
|
chr from,
|
||||||
chr to)
|
chr to)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/rege_dfa.c,v 1.2 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/rege_dfa.c,v 1.3 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@
|
||||||
static chr * /* endpoint, or NULL */
|
static chr * /* endpoint, or NULL */
|
||||||
longest(struct vars * v, /* used only for debug and exec flags */
|
longest(struct vars * v, /* used only for debug and exec flags */
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
chr * start, /* where the match should start */
|
chr *start, /* where the match should start */
|
||||||
chr * stop, /* match must end at or before here */
|
chr *stop, /* match must end at or before here */
|
||||||
int *hitstopp) /* record whether hit v->stop, if non-NULL */
|
int *hitstopp) /* record whether hit v->stop, if non-NULL */
|
||||||
{
|
{
|
||||||
chr *cp;
|
chr *cp;
|
||||||
|
@ -142,10 +142,10 @@ longest(struct vars * v, /* used only for debug and exec flags */
|
||||||
static chr * /* endpoint, or NULL */
|
static chr * /* endpoint, or NULL */
|
||||||
shortest(struct vars * v,
|
shortest(struct vars * v,
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
chr * start, /* where the match should start */
|
chr *start, /* where the match should start */
|
||||||
chr * min, /* match must end at or after here */
|
chr *min, /* match must end at or after here */
|
||||||
chr * max, /* match must end at or before here */
|
chr *max, /* match must end at or before here */
|
||||||
chr ** coldp, /* store coldstart pointer here, if
|
chr **coldp, /* store coldstart pointer here, if
|
||||||
* nonNULL */
|
* nonNULL */
|
||||||
int *hitstopp) /* record whether hit v->stop, if non-NULL */
|
int *hitstopp) /* record whether hit v->stop, if non-NULL */
|
||||||
{
|
{
|
||||||
|
@ -394,7 +394,7 @@ hash(unsigned *uv,
|
||||||
static struct sset *
|
static struct sset *
|
||||||
initialize(struct vars * v, /* used only for debug flags */
|
initialize(struct vars * v, /* used only for debug flags */
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
chr * start)
|
chr *start)
|
||||||
{
|
{
|
||||||
struct sset *ss;
|
struct sset *ss;
|
||||||
int i;
|
int i;
|
||||||
|
@ -430,8 +430,8 @@ miss(struct vars * v, /* used only for debug flags */
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
struct sset * css,
|
struct sset * css,
|
||||||
pcolor co,
|
pcolor co,
|
||||||
chr * cp, /* next chr */
|
chr *cp, /* next chr */
|
||||||
chr * start) /* where the attempt got started */
|
chr *start) /* where the attempt got started */
|
||||||
{
|
{
|
||||||
struct cnfa *cnfa = d->cnfa;
|
struct cnfa *cnfa = d->cnfa;
|
||||||
int i;
|
int i;
|
||||||
|
@ -538,7 +538,7 @@ miss(struct vars * v, /* used only for debug flags */
|
||||||
static int /* predicate: constraint satisfied? */
|
static int /* predicate: constraint satisfied? */
|
||||||
lacon(struct vars * v,
|
lacon(struct vars * v,
|
||||||
struct cnfa * pcnfa, /* parent cnfa */
|
struct cnfa * pcnfa, /* parent cnfa */
|
||||||
chr * cp,
|
chr *cp,
|
||||||
pcolor co) /* "color" of the lookahead constraint */
|
pcolor co) /* "color" of the lookahead constraint */
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
@ -571,8 +571,8 @@ lacon(struct vars * v,
|
||||||
static struct sset *
|
static struct sset *
|
||||||
getvacant(struct vars * v, /* used only for debug flags */
|
getvacant(struct vars * v, /* used only for debug flags */
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
chr * cp,
|
chr *cp,
|
||||||
chr * start)
|
chr *start)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct sset *ss;
|
struct sset *ss;
|
||||||
|
@ -639,8 +639,8 @@ getvacant(struct vars * v, /* used only for debug flags */
|
||||||
static struct sset *
|
static struct sset *
|
||||||
pickss(struct vars * v, /* used only for debug flags */
|
pickss(struct vars * v, /* used only for debug flags */
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
chr * cp,
|
chr *cp,
|
||||||
chr * start)
|
chr *start)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct sset *ss;
|
struct sset *ss;
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/regex/regexec.c,v 1.22 2003/08/04 00:43:21 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/regex/regexec.c,v 1.23 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -166,9 +166,9 @@ static struct sset *pickss(struct vars *, struct dfa *, chr *, chr *);
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
pg_regexec(regex_t *re,
|
pg_regexec(regex_t *re,
|
||||||
const chr * string,
|
const chr *string,
|
||||||
size_t len,
|
size_t len,
|
||||||
rm_detail_t * details,
|
rm_detail_t *details,
|
||||||
size_t nmatch,
|
size_t nmatch,
|
||||||
regmatch_t pmatch[],
|
regmatch_t pmatch[],
|
||||||
int flags)
|
int flags)
|
||||||
|
@ -399,7 +399,7 @@ cfindloop(struct vars * v,
|
||||||
struct colormap * cm,
|
struct colormap * cm,
|
||||||
struct dfa * d,
|
struct dfa * d,
|
||||||
struct dfa * s,
|
struct dfa * s,
|
||||||
chr ** coldp) /* where to put coldstart pointer */
|
chr **coldp) /* where to put coldstart pointer */
|
||||||
{
|
{
|
||||||
chr *begin;
|
chr *begin;
|
||||||
chr *end;
|
chr *end;
|
||||||
|
@ -528,8 +528,8 @@ zapmem(struct vars * v,
|
||||||
static void
|
static void
|
||||||
subset(struct vars * v,
|
subset(struct vars * v,
|
||||||
struct subre * sub,
|
struct subre * sub,
|
||||||
chr * begin,
|
chr *begin,
|
||||||
chr * end)
|
chr *end)
|
||||||
{
|
{
|
||||||
int n = sub->subno;
|
int n = sub->subno;
|
||||||
|
|
||||||
|
@ -548,8 +548,8 @@ subset(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
dissect(struct vars * v,
|
dissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
assert(t != NULL);
|
assert(t != NULL);
|
||||||
MDEBUG(("dissect %ld-%ld\n", LOFF(begin), LOFF(end)));
|
MDEBUG(("dissect %ld-%ld\n", LOFF(begin), LOFF(end)));
|
||||||
|
@ -589,8 +589,8 @@ dissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
condissect(struct vars * v,
|
condissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
struct dfa *d;
|
struct dfa *d;
|
||||||
struct dfa *d2;
|
struct dfa *d2;
|
||||||
|
@ -671,8 +671,8 @@ condissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
altdissect(struct vars * v,
|
altdissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
struct dfa *d;
|
struct dfa *d;
|
||||||
int i;
|
int i;
|
||||||
|
@ -706,8 +706,8 @@ altdissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
cdissect(struct vars * v,
|
cdissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
int er;
|
int er;
|
||||||
|
|
||||||
|
@ -754,8 +754,8 @@ cdissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
ccondissect(struct vars * v,
|
ccondissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
struct dfa *d;
|
struct dfa *d;
|
||||||
struct dfa *d2;
|
struct dfa *d2;
|
||||||
|
@ -855,8 +855,8 @@ ccondissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
crevdissect(struct vars * v,
|
crevdissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
struct dfa *d;
|
struct dfa *d;
|
||||||
struct dfa *d2;
|
struct dfa *d2;
|
||||||
|
@ -953,8 +953,8 @@ crevdissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
cbrdissect(struct vars * v,
|
cbrdissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int n = t->subno;
|
int n = t->subno;
|
||||||
|
@ -1020,8 +1020,8 @@ cbrdissect(struct vars * v,
|
||||||
static int /* regexec return code */
|
static int /* regexec return code */
|
||||||
caltdissect(struct vars * v,
|
caltdissect(struct vars * v,
|
||||||
struct subre * t,
|
struct subre * t,
|
||||||
chr * begin, /* beginning of relevant substring */
|
chr *begin, /* beginning of relevant substring */
|
||||||
chr * end) /* end of same */
|
chr *end) /* end of same */
|
||||||
{
|
{
|
||||||
struct dfa *d;
|
struct dfa *d;
|
||||||
int er;
|
int er;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.127 2003/08/04 02:40:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.128 2003/08/08 21:41:56 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -38,7 +38,7 @@ typedef struct rewrite_event
|
||||||
{
|
{
|
||||||
Oid relation; /* OID of relation having rules */
|
Oid relation; /* OID of relation having rules */
|
||||||
CmdType event; /* type of rule being fired */
|
CmdType event; /* type of rule being fired */
|
||||||
} rewrite_event;
|
} rewrite_event;
|
||||||
|
|
||||||
static Query *rewriteRuleAction(Query *parsetree,
|
static Query *rewriteRuleAction(Query *parsetree,
|
||||||
Query *rule_action,
|
Query *rule_action,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.76 2003/08/04 02:40:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.77 2003/08/08 21:41:58 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -25,10 +25,10 @@
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int sublevels_up;
|
int sublevels_up;
|
||||||
} checkExprHasAggs_context;
|
} checkExprHasAggs_context;
|
||||||
|
|
||||||
static bool checkExprHasAggs_walker(Node *node,
|
static bool checkExprHasAggs_walker(Node *node,
|
||||||
checkExprHasAggs_context * context);
|
checkExprHasAggs_context *context);
|
||||||
static bool checkExprHasSubLink_walker(Node *node, void *context);
|
static bool checkExprHasSubLink_walker(Node *node, void *context);
|
||||||
static Relids offset_relid_set(Relids relids, int offset);
|
static Relids offset_relid_set(Relids relids, int offset);
|
||||||
static Relids adjust_relid_set(Relids relids, int oldrelid, int newrelid);
|
static Relids adjust_relid_set(Relids relids, int oldrelid, int newrelid);
|
||||||
|
@ -63,7 +63,7 @@ checkExprHasAggs(Node *node)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
checkExprHasAggs_walker(Node *node, checkExprHasAggs_context * context)
|
checkExprHasAggs_walker(Node *node, checkExprHasAggs_context *context)
|
||||||
{
|
{
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.20 2003/08/04 02:40:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/freespace/freespace.c,v 1.21 2003/08/08 21:41:59 momjian Exp $
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* NOTES:
|
* NOTES:
|
||||||
|
@ -144,7 +144,7 @@ typedef struct FsmCacheFileHeader
|
||||||
uint32 endian;
|
uint32 endian;
|
||||||
uint32 version;
|
uint32 version;
|
||||||
int32 numRels;
|
int32 numRels;
|
||||||
} FsmCacheFileHeader;
|
} FsmCacheFileHeader;
|
||||||
|
|
||||||
/* Per-relation header */
|
/* Per-relation header */
|
||||||
typedef struct FsmCacheRelHeader
|
typedef struct FsmCacheRelHeader
|
||||||
|
@ -154,7 +154,7 @@ typedef struct FsmCacheRelHeader
|
||||||
uint32 avgRequest; /* moving average of space requests */
|
uint32 avgRequest; /* moving average of space requests */
|
||||||
int32 lastPageCount; /* pages passed to RecordRelationFreeSpace */
|
int32 lastPageCount; /* pages passed to RecordRelationFreeSpace */
|
||||||
int32 storedPages; /* # of pages stored in arena */
|
int32 storedPages; /* # of pages stored in arena */
|
||||||
} FsmCacheRelHeader;
|
} FsmCacheRelHeader;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -236,10 +236,10 @@ static bool lookup_fsm_page_entry(FSMRelation *fsmrel, BlockNumber page,
|
||||||
int *outPageIndex);
|
int *outPageIndex);
|
||||||
static void compact_fsm_storage(void);
|
static void compact_fsm_storage(void);
|
||||||
static void push_fsm_rels_after(FSMRelation *afterRel);
|
static void push_fsm_rels_after(FSMRelation *afterRel);
|
||||||
static void pack_incoming_pages(FSMPageData * newLocation, int newPages,
|
static void pack_incoming_pages(FSMPageData *newLocation, int newPages,
|
||||||
PageFreeSpaceInfo * pageSpaces, int nPages);
|
PageFreeSpaceInfo *pageSpaces, int nPages);
|
||||||
static void pack_existing_pages(FSMPageData * newLocation, int newPages,
|
static void pack_existing_pages(FSMPageData *newLocation, int newPages,
|
||||||
FSMPageData * oldLocation, int oldPages);
|
FSMPageData *oldLocation, int oldPages);
|
||||||
static int fsm_calc_request(FSMRelation *fsmrel);
|
static int fsm_calc_request(FSMRelation *fsmrel);
|
||||||
static int fsm_calc_target_allocation(int myRequest);
|
static int fsm_calc_target_allocation(int myRequest);
|
||||||
static int fsm_current_chunks(FSMRelation *fsmrel);
|
static int fsm_current_chunks(FSMRelation *fsmrel);
|
||||||
|
@ -459,7 +459,7 @@ GetAvgFSMRequestSize(RelFileNode *rel)
|
||||||
void
|
void
|
||||||
RecordRelationFreeSpace(RelFileNode *rel,
|
RecordRelationFreeSpace(RelFileNode *rel,
|
||||||
int nPages,
|
int nPages,
|
||||||
PageFreeSpaceInfo * pageSpaces)
|
PageFreeSpaceInfo *pageSpaces)
|
||||||
{
|
{
|
||||||
FSMRelation *fsmrel;
|
FSMRelation *fsmrel;
|
||||||
|
|
||||||
|
@ -1560,8 +1560,8 @@ push_fsm_rels_after(FSMRelation *afterRel)
|
||||||
#define HISTOGRAM_BINS 64
|
#define HISTOGRAM_BINS 64
|
||||||
|
|
||||||
static void
|
static void
|
||||||
pack_incoming_pages(FSMPageData * newLocation, int newPages,
|
pack_incoming_pages(FSMPageData *newLocation, int newPages,
|
||||||
PageFreeSpaceInfo * pageSpaces, int nPages)
|
PageFreeSpaceInfo *pageSpaces, int nPages)
|
||||||
{
|
{
|
||||||
int histogram[HISTOGRAM_BINS];
|
int histogram[HISTOGRAM_BINS];
|
||||||
int above,
|
int above,
|
||||||
|
@ -1630,8 +1630,8 @@ pack_incoming_pages(FSMPageData * newLocation, int newPages,
|
||||||
* so that we can copy data moving forward in the arrays without problem.
|
* so that we can copy data moving forward in the arrays without problem.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
pack_existing_pages(FSMPageData * newLocation, int newPages,
|
pack_existing_pages(FSMPageData *newLocation, int newPages,
|
||||||
FSMPageData * oldLocation, int oldPages)
|
FSMPageData *oldLocation, int oldPages)
|
||||||
{
|
{
|
||||||
int histogram[HISTOGRAM_BINS];
|
int histogram[HISTOGRAM_BINS];
|
||||||
int above,
|
int above,
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.23 2003/08/04 02:40:03 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/deadlock.c,v 1.24 2003/08/08 21:42:00 momjian Exp $
|
||||||
*
|
*
|
||||||
* Interface:
|
* Interface:
|
||||||
*
|
*
|
||||||
|
@ -61,7 +61,7 @@ typedef struct
|
||||||
LOCKTAG locktag; /* ID of awaited lock object */
|
LOCKTAG locktag; /* ID of awaited lock object */
|
||||||
LOCKMODE lockmode; /* type of lock we're waiting for */
|
LOCKMODE lockmode; /* type of lock we're waiting for */
|
||||||
int pid; /* PID of blocked backend */
|
int pid; /* PID of blocked backend */
|
||||||
} DEADLOCK_INFO;
|
} DEADLOCK_INFO;
|
||||||
|
|
||||||
|
|
||||||
static bool DeadLockCheckRecurse(PGPROC *proc);
|
static bool DeadLockCheckRecurse(PGPROC *proc);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.15 2003/08/06 16:43:43 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.16 2003/08/08 21:42:00 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -54,26 +54,27 @@ s_lock(volatile slock_t *lock, const char *file, int line)
|
||||||
* finish 100 iterations. However, on a uniprocessor, the tight loop
|
* finish 100 iterations. However, on a uniprocessor, the tight loop
|
||||||
* is just a waste of cycles, so don't iterate thousands of times.
|
* is just a waste of cycles, so don't iterate thousands of times.
|
||||||
*
|
*
|
||||||
* Once we do decide to block, we use randomly increasing select() delays.
|
* Once we do decide to block, we use randomly increasing select()
|
||||||
* The first delay is 10 msec, then the delay randomly increases to about
|
* delays. The first delay is 10 msec, then the delay randomly
|
||||||
* one second, after which we reset to 10 msec and start again. The idea
|
* increases to about one second, after which we reset to 10 msec and
|
||||||
* here is that in the presence of heavy contention we need to increase
|
* start again. The idea here is that in the presence of heavy
|
||||||
* the delay, else the spinlock holder may never get to run and release
|
* contention we need to increase the delay, else the spinlock holder
|
||||||
* the lock. (Consider situation where spinlock holder has been nice'd
|
* may never get to run and release the lock. (Consider situation
|
||||||
* down in priority by the scheduler --- it will not get scheduled until
|
* where spinlock holder has been nice'd down in priority by the
|
||||||
* all would-be acquirers are sleeping, so if we always use a 10-msec
|
* scheduler --- it will not get scheduled until all would-be
|
||||||
* sleep, there is a real possibility of starvation.) But we can't just
|
* acquirers are sleeping, so if we always use a 10-msec sleep, there
|
||||||
* clamp the delay to an upper bound, else it would take a long time to
|
* is a real possibility of starvation.) But we can't just clamp the
|
||||||
* make a reasonable number of tries.
|
* delay to an upper bound, else it would take a long time to make a
|
||||||
|
* reasonable number of tries.
|
||||||
*
|
*
|
||||||
* We time out and declare error after NUM_DELAYS delays (thus, exactly
|
* We time out and declare error after NUM_DELAYS delays (thus, exactly
|
||||||
* that many tries). With the given settings, this will usually take
|
* that many tries). With the given settings, this will usually take
|
||||||
* 3 or so minutes. It seems better to fix the total number of tries (and
|
* 3 or so minutes. It seems better to fix the total number of tries
|
||||||
* thus the probability of unintended failure) than to fix the total time
|
* (and thus the probability of unintended failure) than to fix the
|
||||||
* spent.
|
* total time spent.
|
||||||
*
|
*
|
||||||
* The select() delays are measured in centiseconds (0.01 sec) because
|
* The select() delays are measured in centiseconds (0.01 sec) because 10
|
||||||
* 10 msec is a common resolution limit at the OS level.
|
* msec is a common resolution limit at the OS level.
|
||||||
*/
|
*/
|
||||||
#define SPINS_PER_DELAY 100
|
#define SPINS_PER_DELAY 100
|
||||||
#define NUM_DELAYS 1000
|
#define NUM_DELAYS 1000
|
||||||
|
@ -97,12 +98,13 @@ s_lock(volatile slock_t *lock, const char *file, int line)
|
||||||
(void) select(0, NULL, NULL, NULL, &delay);
|
(void) select(0, NULL, NULL, NULL, &delay);
|
||||||
|
|
||||||
#if defined(S_LOCK_TEST)
|
#if defined(S_LOCK_TEST)
|
||||||
fprintf(stdout, "*"); fflush(stdout);
|
fprintf(stdout, "*");
|
||||||
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* increase delay by a random fraction between 1X and 2X */
|
/* increase delay by a random fraction between 1X and 2X */
|
||||||
cur_delay += (int) (cur_delay *
|
cur_delay += (int) (cur_delay *
|
||||||
(((double) random()) / ((double) MAX_RANDOM_VALUE)) + 0.5);
|
(((double) random()) / ((double) MAX_RANDOM_VALUE)) + 0.5);
|
||||||
/* wrap back to minimum delay when max is exceeded */
|
/* wrap back to minimum delay when max is exceeded */
|
||||||
if (cur_delay > MAX_DELAY_CSEC)
|
if (cur_delay > MAX_DELAY_CSEC)
|
||||||
cur_delay = MIN_DELAY_CSEC;
|
cur_delay = MIN_DELAY_CSEC;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.96 2003/08/04 02:40:04 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.97 2003/08/08 21:42:04 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1194,7 +1194,7 @@ array_length_coerce(PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
Oid elemtype;
|
Oid elemtype;
|
||||||
FmgrInfo coerce_finfo;
|
FmgrInfo coerce_finfo;
|
||||||
} alc_extra;
|
} alc_extra;
|
||||||
alc_extra *my_extra;
|
alc_extra *my_extra;
|
||||||
FunctionCallInfoData locfcinfo;
|
FunctionCallInfoData locfcinfo;
|
||||||
|
|
||||||
|
@ -2036,7 +2036,7 @@ array_map(FunctionCallInfo fcinfo, Oid inpType, Oid retType)
|
||||||
{
|
{
|
||||||
ArrayMetaState inp_extra;
|
ArrayMetaState inp_extra;
|
||||||
ArrayMetaState ret_extra;
|
ArrayMetaState ret_extra;
|
||||||
} am_extra;
|
} am_extra;
|
||||||
am_extra *my_extra;
|
am_extra *my_extra;
|
||||||
ArrayMetaState *inp_extra;
|
ArrayMetaState *inp_extra;
|
||||||
ArrayMetaState *ret_extra;
|
ArrayMetaState *ret_extra;
|
||||||
|
@ -2531,7 +2531,7 @@ array_cmp(FunctionCallInfo fcinfo)
|
||||||
char typalign;
|
char typalign;
|
||||||
FmgrInfo eqproc;
|
FmgrInfo eqproc;
|
||||||
FmgrInfo ordproc;
|
FmgrInfo ordproc;
|
||||||
} ac_extra;
|
} ac_extra;
|
||||||
ac_extra *my_extra;
|
ac_extra *my_extra;
|
||||||
|
|
||||||
element_type = ARR_ELEMTYPE(array1);
|
element_type = ARR_ELEMTYPE(array1);
|
||||||
|
@ -2896,7 +2896,7 @@ array_type_coerce(PG_FUNCTION_ARGS)
|
||||||
Oid srctype;
|
Oid srctype;
|
||||||
Oid desttype;
|
Oid desttype;
|
||||||
FmgrInfo coerce_finfo;
|
FmgrInfo coerce_finfo;
|
||||||
} atc_extra;
|
} atc_extra;
|
||||||
atc_extra *my_extra;
|
atc_extra *my_extra;
|
||||||
FunctionCallInfoData locfcinfo;
|
FunctionCallInfoData locfcinfo;
|
||||||
|
|
||||||
|
@ -2989,7 +2989,7 @@ array_type_coerce(PG_FUNCTION_ARGS)
|
||||||
* rcontext is where to keep working state
|
* rcontext is where to keep working state
|
||||||
*/
|
*/
|
||||||
ArrayBuildState *
|
ArrayBuildState *
|
||||||
accumArrayResult(ArrayBuildState * astate,
|
accumArrayResult(ArrayBuildState *astate,
|
||||||
Datum dvalue, bool disnull,
|
Datum dvalue, bool disnull,
|
||||||
Oid element_type,
|
Oid element_type,
|
||||||
MemoryContext rcontext)
|
MemoryContext rcontext)
|
||||||
|
@ -3051,7 +3051,7 @@ accumArrayResult(ArrayBuildState * astate,
|
||||||
* rcontext is where to construct result
|
* rcontext is where to construct result
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
makeArrayResult(ArrayBuildState * astate,
|
makeArrayResult(ArrayBuildState *astate,
|
||||||
MemoryContext rcontext)
|
MemoryContext rcontext)
|
||||||
{
|
{
|
||||||
int dims[1];
|
int dims[1];
|
||||||
|
@ -3073,7 +3073,7 @@ makeArrayResult(ArrayBuildState * astate,
|
||||||
* rcontext is where to construct result
|
* rcontext is where to construct result
|
||||||
*/
|
*/
|
||||||
Datum
|
Datum
|
||||||
makeMdArrayResult(ArrayBuildState * astate,
|
makeMdArrayResult(ArrayBuildState *astate,
|
||||||
int ndims,
|
int ndims,
|
||||||
int *dims,
|
int *dims,
|
||||||
int *lbs,
|
int *lbs,
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.112 2003/08/05 18:30:21 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.113 2003/08/08 21:42:05 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -711,7 +711,7 @@ TrimTrailingZeros(char *str)
|
||||||
* *numfields - set to the actual number of fields detected
|
* *numfields - set to the actual number of fields detected
|
||||||
*
|
*
|
||||||
* The fields extracted from the input are stored as separate, null-terminated
|
* The fields extracted from the input are stored as separate, null-terminated
|
||||||
* strings in the workspace at lowstr. Any text is converted to lower case.
|
* strings in the workspace at lowstr. Any text is converted to lower case.
|
||||||
*
|
*
|
||||||
* Several field types are assigned:
|
* Several field types are assigned:
|
||||||
* DTK_NUMBER - digits and (possibly) a decimal point
|
* DTK_NUMBER - digits and (possibly) a decimal point
|
||||||
|
@ -769,7 +769,7 @@ ParseDateTime(const char *timestr, char *lowstr,
|
||||||
else if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
|
else if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
|
||||||
{
|
{
|
||||||
/* save delimiting character to use later */
|
/* save delimiting character to use later */
|
||||||
char delim = *cp;
|
char delim = *cp;
|
||||||
|
|
||||||
*lp++ = *cp++;
|
*lp++ = *cp++;
|
||||||
/* second field is all digits? then no embedded text month */
|
/* second field is all digits? then no embedded text month */
|
||||||
|
@ -833,7 +833,7 @@ ParseDateTime(const char *timestr, char *lowstr,
|
||||||
*/
|
*/
|
||||||
if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
|
if ((*cp == '-') || (*cp == '/') || (*cp == '.'))
|
||||||
{
|
{
|
||||||
char delim = *cp;
|
char delim = *cp;
|
||||||
|
|
||||||
ftype[nf] = DTK_DATE;
|
ftype[nf] = DTK_DATE;
|
||||||
*lp++ = *cp++;
|
*lp++ = *cp++;
|
||||||
|
@ -2415,7 +2415,7 @@ DecodeNumber(int flen, char *str, int fmask,
|
||||||
|
|
||||||
if (*cp == '.')
|
if (*cp == '.')
|
||||||
{
|
{
|
||||||
double frac;
|
double frac;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* More than two digits before decimal point? Then could be a date
|
* More than two digits before decimal point? Then could be a date
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v 1.47 2003/08/04 00:43:25 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v 1.48 2003/08/08 21:42:06 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -872,7 +872,7 @@ ascii(PG_FUNCTION_ARGS)
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
Datum
|
Datum
|
||||||
chr(PG_FUNCTION_ARGS)
|
chr (PG_FUNCTION_ARGS)
|
||||||
{
|
{
|
||||||
int32 cvalue = PG_GETARG_INT32(0);
|
int32 cvalue = PG_GETARG_INT32(0);
|
||||||
text *result;
|
text *result;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.48 2003/08/04 02:40:05 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.49 2003/08/08 21:42:07 momjian Exp $
|
||||||
*
|
*
|
||||||
* Alistair Crooks added the code for the regex caching
|
* Alistair Crooks added the code for the regex caching
|
||||||
* agc - cached the regular expressions used - there's a good chance
|
* agc - cached the regular expressions used - there's a good chance
|
||||||
|
@ -73,7 +73,7 @@ typedef struct cached_re_str
|
||||||
text *cre_pat; /* original RE (untoasted TEXT form) */
|
text *cre_pat; /* original RE (untoasted TEXT form) */
|
||||||
int cre_flags; /* compile flags: extended,icase etc */
|
int cre_flags; /* compile flags: extended,icase etc */
|
||||||
regex_t cre_re; /* the compiled regular expression */
|
regex_t cre_re; /* the compiled regular expression */
|
||||||
} cached_re_str;
|
} cached_re_str;
|
||||||
|
|
||||||
static int num_res = 0; /* # of cached re's */
|
static int num_res = 0; /* # of cached re's */
|
||||||
static cached_re_str re_array[MAX_CACHED_RES]; /* cached re's */
|
static cached_re_str re_array[MAX_CACHED_RES]; /* cached re's */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
* back to source text
|
* back to source text
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.149 2003/08/04 00:43:26 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.150 2003/08/08 21:42:09 momjian Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
|
@ -181,15 +181,15 @@ static void get_names_for_var(Var *var, deparse_context *context,
|
||||||
char **schemaname, char **refname, char **attname);
|
char **schemaname, char **refname, char **attname);
|
||||||
static RangeTblEntry *find_rte_by_refname(const char *refname,
|
static RangeTblEntry *find_rte_by_refname(const char *refname,
|
||||||
deparse_context *context);
|
deparse_context *context);
|
||||||
static const char *get_simple_binary_op_name(OpExpr * expr);
|
static const char *get_simple_binary_op_name(OpExpr *expr);
|
||||||
static bool isSimpleNode(Node *node, Node *parentNode, int prettyFlags);
|
static bool isSimpleNode(Node *node, Node *parentNode, int prettyFlags);
|
||||||
static void appendStringInfoSpaces(StringInfo buf, int count);
|
static void appendStringInfoSpaces(StringInfo buf, int count);
|
||||||
static void appendContextKeyword(deparse_context *context, const char *str,
|
static void appendContextKeyword(deparse_context *context, const char *str,
|
||||||
int indentBefore, int indentAfter, int indentPlus);
|
int indentBefore, int indentAfter, int indentPlus);
|
||||||
static void get_rule_expr(Node *node, deparse_context *context,
|
static void get_rule_expr(Node *node, deparse_context *context,
|
||||||
bool showimplicit);
|
bool showimplicit);
|
||||||
static void get_oper_expr(OpExpr * expr, deparse_context *context);
|
static void get_oper_expr(OpExpr *expr, deparse_context *context);
|
||||||
static void get_func_expr(FuncExpr * expr, deparse_context *context,
|
static void get_func_expr(FuncExpr *expr, deparse_context *context,
|
||||||
bool showimplicit);
|
bool showimplicit);
|
||||||
static void get_agg_expr(Aggref *aggref, deparse_context *context);
|
static void get_agg_expr(Aggref *aggref, deparse_context *context);
|
||||||
static Node *strip_type_coercion(Node *expr, Oid resultType);
|
static Node *strip_type_coercion(Node *expr, Oid resultType);
|
||||||
|
@ -2439,7 +2439,7 @@ find_rte_by_refname(const char *refname, deparse_context *context)
|
||||||
* will return single char binary operator name, or NULL if it's not
|
* will return single char binary operator name, or NULL if it's not
|
||||||
*/
|
*/
|
||||||
static const char *
|
static const char *
|
||||||
get_simple_binary_op_name(OpExpr * expr)
|
get_simple_binary_op_name(OpExpr *expr)
|
||||||
{
|
{
|
||||||
List *args = expr->args;
|
List *args = expr->args;
|
||||||
|
|
||||||
|
@ -3235,7 +3235,7 @@ get_rule_expr(Node *node, deparse_context *context,
|
||||||
* get_oper_expr - Parse back an OpExpr node
|
* get_oper_expr - Parse back an OpExpr node
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
get_oper_expr(OpExpr * expr, deparse_context *context)
|
get_oper_expr(OpExpr *expr, deparse_context *context)
|
||||||
{
|
{
|
||||||
StringInfo buf = context->buf;
|
StringInfo buf = context->buf;
|
||||||
Oid opno = expr->opno;
|
Oid opno = expr->opno;
|
||||||
|
@ -3298,7 +3298,7 @@ get_oper_expr(OpExpr * expr, deparse_context *context)
|
||||||
* get_func_expr - Parse back a FuncExpr node
|
* get_func_expr - Parse back a FuncExpr node
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
get_func_expr(FuncExpr * expr, deparse_context *context,
|
get_func_expr(FuncExpr *expr, deparse_context *context,
|
||||||
bool showimplicit)
|
bool showimplicit)
|
||||||
{
|
{
|
||||||
StringInfo buf = context->buf;
|
StringInfo buf = context->buf;
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.144 2003/08/04 02:40:05 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.145 2003/08/08 21:42:10 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -2030,7 +2030,7 @@ estimate_num_groups(Query *root, List *groupExprs, double input_rows)
|
||||||
{ /* varinfos is a List of these */
|
{ /* varinfos is a List of these */
|
||||||
Var *var;
|
Var *var;
|
||||||
double ndistinct;
|
double ndistinct;
|
||||||
} MyVarInfo;
|
} MyVarInfo;
|
||||||
|
|
||||||
/* We should not be called unless query has GROUP BY (or DISTINCT) */
|
/* We should not be called unless query has GROUP BY (or DISTINCT) */
|
||||||
Assert(groupExprs != NIL);
|
Assert(groupExprs != NIL);
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.91 2003/08/08 00:10:31 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/timestamp.c,v 1.92 2003/08/08 21:42:10 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -1307,11 +1307,12 @@ timestamp_cmp_internal(Timestamp dt1, Timestamp dt2)
|
||||||
#ifdef HAVE_INT64_TIMESTAMP
|
#ifdef HAVE_INT64_TIMESTAMP
|
||||||
return ((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0));
|
return ((dt1 < dt2) ? -1 : ((dt1 > dt2) ? 1 : 0));
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* When using float representation, we have to be wary of NaNs.
|
* When using float representation, we have to be wary of NaNs.
|
||||||
*
|
*
|
||||||
* We consider all NANs to be equal and larger than any non-NAN. This
|
* We consider all NANs to be equal and larger than any non-NAN. This is
|
||||||
* is somewhat arbitrary; the important thing is to have a consistent
|
* somewhat arbitrary; the important thing is to have a consistent
|
||||||
* sort order.
|
* sort order.
|
||||||
*/
|
*/
|
||||||
if (isnan(dt1))
|
if (isnan(dt1))
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.118 2003/08/04 02:40:06 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.119 2003/08/08 21:42:11 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -115,7 +115,7 @@ typedef struct ErrorData
|
||||||
char *context; /* context message */
|
char *context; /* context message */
|
||||||
int cursorpos; /* cursor index into query string */
|
int cursorpos; /* cursor index into query string */
|
||||||
int saved_errno; /* errno at entry */
|
int saved_errno; /* errno at entry */
|
||||||
} ErrorData;
|
} ErrorData;
|
||||||
|
|
||||||
/* We provide a small stack of ErrorData records for re-entrant cases */
|
/* We provide a small stack of ErrorData records for re-entrant cases */
|
||||||
#define ERRORDATA_STACK_SIZE 5
|
#define ERRORDATA_STACK_SIZE 5
|
||||||
|
@ -138,9 +138,9 @@ static int recursion_depth = 0; /* to detect actual recursion */
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
static void send_message_to_server_log(ErrorData * edata);
|
static void send_message_to_server_log(ErrorData *edata);
|
||||||
static void send_message_to_frontend(ErrorData * edata);
|
static void send_message_to_frontend(ErrorData *edata);
|
||||||
static char *expand_fmt_string(const char *fmt, ErrorData * edata);
|
static char *expand_fmt_string(const char *fmt, ErrorData *edata);
|
||||||
static const char *useful_strerror(int errnum);
|
static const char *useful_strerror(int errnum);
|
||||||
static const char *error_severity(int elevel);
|
static const char *error_severity(int elevel);
|
||||||
static const char *print_timestamp(void);
|
static const char *print_timestamp(void);
|
||||||
|
@ -1024,7 +1024,7 @@ write_syslog(int level, const char *line)
|
||||||
* Write error report to server's log
|
* Write error report to server's log
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
send_message_to_server_log(ErrorData * edata)
|
send_message_to_server_log(ErrorData *edata)
|
||||||
{
|
{
|
||||||
StringInfoData buf;
|
StringInfoData buf;
|
||||||
|
|
||||||
|
@ -1151,7 +1151,7 @@ send_message_to_server_log(ErrorData * edata)
|
||||||
* Write error report to client
|
* Write error report to client
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
send_message_to_frontend(ErrorData * edata)
|
send_message_to_frontend(ErrorData *edata)
|
||||||
{
|
{
|
||||||
StringInfoData msgbuf;
|
StringInfoData msgbuf;
|
||||||
|
|
||||||
|
@ -1289,7 +1289,7 @@ send_message_to_frontend(ErrorData * edata)
|
||||||
* The result is a palloc'd string.
|
* The result is a palloc'd string.
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
expand_fmt_string(const char *fmt, ErrorData * edata)
|
expand_fmt_string(const char *fmt, ErrorData *edata)
|
||||||
{
|
{
|
||||||
StringInfoData buf;
|
StringInfoData buf;
|
||||||
const char *cp;
|
const char *cp;
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.4 2003/08/04 00:43:27 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/misc/help_config.c,v 1.5 2003/08/08 21:42:24 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -117,11 +117,11 @@ typedef union
|
||||||
struct config_real real;
|
struct config_real real;
|
||||||
struct config_int integer;
|
struct config_int integer;
|
||||||
struct config_string string;
|
struct config_string string;
|
||||||
} mixedStruct;
|
} mixedStruct;
|
||||||
|
|
||||||
|
|
||||||
/* function prototypes */
|
/* function prototypes */
|
||||||
static bool varMatches(mixedStruct * structToTest);
|
static bool varMatches(mixedStruct *structToTest);
|
||||||
static int compareMixedStructs(const void *, const void *);
|
static int compareMixedStructs(const void *, const void *);
|
||||||
static mixedStruct **varsToDisplay(int *resultListSize);
|
static mixedStruct **varsToDisplay(int *resultListSize);
|
||||||
static const char *usageErrMsg(void);
|
static const char *usageErrMsg(void);
|
||||||
|
@ -129,8 +129,8 @@ static void helpMessage(void);
|
||||||
static void listAllGroups(void);
|
static void listAllGroups(void);
|
||||||
static void printGenericHead(struct config_generic structToPrint);
|
static void printGenericHead(struct config_generic structToPrint);
|
||||||
static void printGenericFoot(struct config_generic structToPrint);
|
static void printGenericFoot(struct config_generic structToPrint);
|
||||||
static void printMixedStruct(mixedStruct * structToPrint);
|
static void printMixedStruct(mixedStruct *structToPrint);
|
||||||
static bool displayStruct(mixedStruct * structToDisplay);
|
static bool displayStruct(mixedStruct *structToDisplay);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -275,7 +275,7 @@ varsToDisplay(int *resultListSize)
|
||||||
* + It's flag bits are set to GUC_DISALLOW_IN_FILE
|
* + It's flag bits are set to GUC_DISALLOW_IN_FILE
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
displayStruct(mixedStruct * structToDisplay)
|
displayStruct(mixedStruct *structToDisplay)
|
||||||
{
|
{
|
||||||
if (structToDisplay->generic.flags & (GUC_NO_SHOW_ALL |
|
if (structToDisplay->generic.flags & (GUC_NO_SHOW_ALL |
|
||||||
GUC_NOT_IN_SAMPLE |
|
GUC_NOT_IN_SAMPLE |
|
||||||
|
@ -292,7 +292,7 @@ displayStruct(mixedStruct * structToDisplay)
|
||||||
* be returned to the user.
|
* be returned to the user.
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
varMatches(mixedStruct * structToTest)
|
varMatches(mixedStruct *structToTest)
|
||||||
{
|
{
|
||||||
bool matches = false;
|
bool matches = false;
|
||||||
bool specificSearch = false; /* This is true if the user
|
bool specificSearch = false; /* This is true if the user
|
||||||
|
@ -347,7 +347,7 @@ varMatches(mixedStruct * structToTest)
|
||||||
* a different format, depending on what the user wants to see.
|
* a different format, depending on what the user wants to see.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
printMixedStruct(mixedStruct * structToPrint)
|
printMixedStruct(mixedStruct *structToPrint)
|
||||||
{
|
{
|
||||||
printGenericHead(structToPrint->generic);
|
printGenericHead(structToPrint->generic);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
|
* Copyright (c) 2000-2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.70 2003/08/04 23:59:39 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/bin/psql/common.c,v 1.71 2003/08/08 21:42:24 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#include "postgres_fe.h"
|
#include "postgres_fe.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -487,8 +487,8 @@ PrintQueryTuples(const PGresult *results)
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
PrintQueryResults(PGresult *results,
|
PrintQueryResults(PGresult *results,
|
||||||
const TimevalStruct * before,
|
const TimevalStruct *before,
|
||||||
const TimevalStruct * after)
|
const TimevalStruct *after)
|
||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: genam.h,v 1.42 2003/08/04 02:40:10 momjian Exp $
|
* $Id: genam.h,v 1.43 2003/08/08 21:42:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -46,7 +46,7 @@ typedef struct IndexVacuumCleanupInfo
|
||||||
{
|
{
|
||||||
bool vacuum_full; /* VACUUM FULL (we have exclusive lock) */
|
bool vacuum_full; /* VACUUM FULL (we have exclusive lock) */
|
||||||
int message_level; /* ereport level for progress messages */
|
int message_level; /* ereport level for progress messages */
|
||||||
} IndexVacuumCleanupInfo;
|
} IndexVacuumCleanupInfo;
|
||||||
|
|
||||||
/* Struct for heap-or-index scans of system tables */
|
/* Struct for heap-or-index scans of system tables */
|
||||||
typedef struct SysScanDescData
|
typedef struct SysScanDescData
|
||||||
|
@ -89,7 +89,7 @@ extern IndexBulkDeleteResult *index_bulk_delete(Relation indexRelation,
|
||||||
IndexBulkDeleteCallback callback,
|
IndexBulkDeleteCallback callback,
|
||||||
void *callback_state);
|
void *callback_state);
|
||||||
extern IndexBulkDeleteResult *index_vacuum_cleanup(Relation indexRelation,
|
extern IndexBulkDeleteResult *index_vacuum_cleanup(Relation indexRelation,
|
||||||
IndexVacuumCleanupInfo * info,
|
IndexVacuumCleanupInfo *info,
|
||||||
IndexBulkDeleteResult *stats);
|
IndexBulkDeleteResult *stats);
|
||||||
extern RegProcedure index_cost_estimator(Relation indexRelation);
|
extern RegProcedure index_cost_estimator(Relation indexRelation);
|
||||||
extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum,
|
extern RegProcedure index_getprocid(Relation irel, AttrNumber attnum,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nbtree.h,v 1.69 2003/08/04 02:40:10 momjian Exp $
|
* $Id: nbtree.h,v 1.70 2003/08/08 21:42:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -217,7 +217,7 @@ typedef struct xl_btree_metadata
|
||||||
uint32 level;
|
uint32 level;
|
||||||
BlockNumber fastroot;
|
BlockNumber fastroot;
|
||||||
uint32 fastlevel;
|
uint32 fastlevel;
|
||||||
} xl_btree_metadata;
|
} xl_btree_metadata;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is what we need to know about simple (without split) insert.
|
* This is what we need to know about simple (without split) insert.
|
||||||
|
@ -291,7 +291,7 @@ typedef struct xl_btree_delete_page
|
||||||
BlockNumber leftblk; /* child block's left sibling, if any */
|
BlockNumber leftblk; /* child block's left sibling, if any */
|
||||||
BlockNumber rightblk; /* child block's right sibling */
|
BlockNumber rightblk; /* child block's right sibling */
|
||||||
/* xl_btree_metadata FOLLOWS IF XLOG_BTREE_DELETE_PAGE_META */
|
/* xl_btree_metadata FOLLOWS IF XLOG_BTREE_DELETE_PAGE_META */
|
||||||
} xl_btree_delete_page;
|
} xl_btree_delete_page;
|
||||||
|
|
||||||
#define SizeOfBtreeDeletePage (offsetof(xl_btree_delete_page, rightblk) + sizeof(BlockNumber))
|
#define SizeOfBtreeDeletePage (offsetof(xl_btree_delete_page, rightblk) + sizeof(BlockNumber))
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ typedef struct xl_btree_newmeta
|
||||||
{
|
{
|
||||||
RelFileNode node;
|
RelFileNode node;
|
||||||
xl_btree_metadata meta;
|
xl_btree_metadata meta;
|
||||||
} xl_btree_newmeta;
|
} xl_btree_newmeta;
|
||||||
|
|
||||||
#define SizeOfBtreeNewmeta (sizeof(xl_btree_newmeta))
|
#define SizeOfBtreeNewmeta (sizeof(xl_btree_newmeta))
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@ typedef struct xl_btree_newpage
|
||||||
RelFileNode node;
|
RelFileNode node;
|
||||||
BlockNumber blkno; /* location of new page */
|
BlockNumber blkno; /* location of new page */
|
||||||
/* entire page contents follow at end of record */
|
/* entire page contents follow at end of record */
|
||||||
} xl_btree_newpage;
|
} xl_btree_newpage;
|
||||||
|
|
||||||
#define SizeOfBtreeNewpage (offsetof(xl_btree_newpage, blkno) + sizeof(BlockNumber))
|
#define SizeOfBtreeNewpage (offsetof(xl_btree_newpage, blkno) + sizeof(BlockNumber))
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: slru.h,v 1.2 2003/08/04 00:43:30 momjian Exp $
|
* $Id: slru.h,v 1.3 2003/08/08 21:42:32 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef SLRU_H
|
#ifndef SLRU_H
|
||||||
#define SLRU_H
|
#define SLRU_H
|
||||||
|
@ -25,7 +25,7 @@ typedef struct SlruLockData
|
||||||
* doesn't need to be in shared memory.
|
* doesn't need to be in shared memory.
|
||||||
*/
|
*/
|
||||||
LWLockId BufferLocks[NUM_CLOG_BUFFERS]; /* Per-buffer I/O locks */
|
LWLockId BufferLocks[NUM_CLOG_BUFFERS]; /* Per-buffer I/O locks */
|
||||||
} SlruLockData;
|
} SlruLockData;
|
||||||
typedef SlruLockData *SlruLock;
|
typedef SlruLockData *SlruLock;
|
||||||
|
|
||||||
typedef struct SlruCtlData
|
typedef struct SlruCtlData
|
||||||
|
@ -47,7 +47,7 @@ typedef struct SlruCtlData
|
||||||
*/
|
*/
|
||||||
bool (*PagePrecedes) (int, int);
|
bool (*PagePrecedes) (int, int);
|
||||||
|
|
||||||
} SlruCtlData;
|
} SlruCtlData;
|
||||||
typedef SlruCtlData *SlruCtl;
|
typedef SlruCtlData *SlruCtl;
|
||||||
|
|
||||||
extern int SimpleLruShmemSize(void);
|
extern int SimpleLruShmemSize(void);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: xact.h,v 1.54 2003/08/04 02:40:10 momjian Exp $
|
* $Id: xact.h,v 1.55 2003/08/08 21:42:32 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -44,7 +44,7 @@ typedef enum TransState
|
||||||
TRANS_INPROGRESS,
|
TRANS_INPROGRESS,
|
||||||
TRANS_COMMIT,
|
TRANS_COMMIT,
|
||||||
TRANS_ABORT
|
TRANS_ABORT
|
||||||
} TransState;
|
} TransState;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* transaction block states - transaction state of client queries
|
* transaction block states - transaction state of client queries
|
||||||
|
@ -57,7 +57,7 @@ typedef enum TBlockState
|
||||||
TBLOCK_END,
|
TBLOCK_END,
|
||||||
TBLOCK_ABORT,
|
TBLOCK_ABORT,
|
||||||
TBLOCK_ENDABORT
|
TBLOCK_ENDABORT
|
||||||
} TBlockState;
|
} TBlockState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* transaction state structure
|
* transaction state structure
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_constraint.h,v 1.8 2003/08/04 02:40:12 momjian Exp $
|
* $Id: pg_constraint.h,v 1.9 2003/08/08 21:42:32 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* the genbki.sh script reads this file and generates .bki
|
* the genbki.sh script reads this file and generates .bki
|
||||||
|
@ -149,7 +149,7 @@ typedef enum CONSTRAINTCATEGORY
|
||||||
CONSTRAINT_RELATION,
|
CONSTRAINT_RELATION,
|
||||||
CONSTRAINT_DOMAIN,
|
CONSTRAINT_DOMAIN,
|
||||||
CONSTRAINT_ASSERTION
|
CONSTRAINT_ASSERTION
|
||||||
} CONSTRAINTCATEGORY;
|
} CONSTRAINTCATEGORY;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes for functions in pg_constraint.c
|
* prototypes for functions in pg_constraint.c
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: portalcmds.h,v 1.12 2003/08/04 02:40:13 momjian Exp $
|
* $Id: portalcmds.h,v 1.13 2003/08/08 21:42:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
#include "utils/portal.h"
|
#include "utils/portal.h"
|
||||||
|
|
||||||
|
|
||||||
extern void PerformCursorOpen(DeclareCursorStmt * stmt);
|
extern void PerformCursorOpen(DeclareCursorStmt *stmt);
|
||||||
|
|
||||||
extern void PerformPortalFetch(FetchStmt *stmt, DestReceiver *dest,
|
extern void PerformPortalFetch(FetchStmt *stmt, DestReceiver *dest,
|
||||||
char *completionTag);
|
char *completionTag);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
|
* Copyright (c) 2002-2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Id: prepare.h,v 1.7 2003/08/04 00:43:30 momjian Exp $
|
* $Id: prepare.h,v 1.8 2003/08/08 21:42:40 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,7 @@ typedef struct
|
||||||
List *plan_list; /* list of plans */
|
List *plan_list; /* list of plans */
|
||||||
List *argtype_list; /* list of parameter type OIDs */
|
List *argtype_list; /* list of parameter type OIDs */
|
||||||
MemoryContext context; /* context containing this query */
|
MemoryContext context; /* context containing this query */
|
||||||
} PreparedStatement;
|
} PreparedStatement;
|
||||||
|
|
||||||
|
|
||||||
/* Utility statements PREPARE, EXECUTE, DEALLOCATE, EXPLAIN EXECUTE */
|
/* Utility statements PREPARE, EXECUTE, DEALLOCATE, EXPLAIN EXECUTE */
|
||||||
|
@ -57,6 +57,6 @@ extern PreparedStatement *FetchPreparedStatement(const char *stmt_name,
|
||||||
bool throwError);
|
bool throwError);
|
||||||
extern void DropPreparedStatement(const char *stmt_name, bool showError);
|
extern void DropPreparedStatement(const char *stmt_name, bool showError);
|
||||||
extern List *FetchPreparedStatementParams(const char *stmt_name);
|
extern List *FetchPreparedStatementParams(const char *stmt_name);
|
||||||
extern TupleDesc FetchPreparedStatementResultDesc(PreparedStatement * stmt);
|
extern TupleDesc FetchPreparedStatementResultDesc(PreparedStatement *stmt);
|
||||||
|
|
||||||
#endif /* PREPARE_H */
|
#endif /* PREPARE_H */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: sequence.h,v 1.25 2003/08/04 02:40:13 momjian Exp $
|
* $Id: sequence.h,v 1.26 2003/08/08 21:42:41 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +84,7 @@ extern Datum setval(PG_FUNCTION_ARGS);
|
||||||
extern Datum setval_and_iscalled(PG_FUNCTION_ARGS);
|
extern Datum setval_and_iscalled(PG_FUNCTION_ARGS);
|
||||||
|
|
||||||
extern void DefineSequence(CreateSeqStmt *stmt);
|
extern void DefineSequence(CreateSeqStmt *stmt);
|
||||||
extern void AlterSequence(AlterSeqStmt * stmt);
|
extern void AlterSequence(AlterSeqStmt *stmt);
|
||||||
|
|
||||||
extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
extern void seq_redo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||||
extern void seq_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
extern void seq_undo(XLogRecPtr lsn, XLogRecord *rptr);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: executor.h,v 1.98 2003/08/04 02:40:13 momjian Exp $
|
* $Id: executor.h,v 1.99 2003/08/08 21:42:44 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -31,9 +31,9 @@
|
||||||
/*
|
/*
|
||||||
* prototypes from functions in execAmi.c
|
* prototypes from functions in execAmi.c
|
||||||
*/
|
*/
|
||||||
extern void ExecReScan(PlanState * node, ExprContext *exprCtxt);
|
extern void ExecReScan(PlanState *node, ExprContext *exprCtxt);
|
||||||
extern void ExecMarkPos(PlanState * node);
|
extern void ExecMarkPos(PlanState *node);
|
||||||
extern void ExecRestrPos(PlanState * node);
|
extern void ExecRestrPos(PlanState *node);
|
||||||
extern bool ExecSupportsMarkRestore(NodeTag plantype);
|
extern bool ExecSupportsMarkRestore(NodeTag plantype);
|
||||||
extern bool ExecSupportsBackwardScan(Plan *node);
|
extern bool ExecSupportsBackwardScan(Plan *node);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ extern TupleHashEntry LookupTupleHashEntry(TupleHashTable hashtable,
|
||||||
TupleTableSlot *slot,
|
TupleTableSlot *slot,
|
||||||
bool *isnew);
|
bool *isnew);
|
||||||
extern TupleHashEntry ScanTupleHashTable(TupleHashTable hashtable,
|
extern TupleHashEntry ScanTupleHashTable(TupleHashTable hashtable,
|
||||||
TupleHashIterator * state);
|
TupleHashIterator *state);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes from functions in execJunk.c
|
* prototypes from functions in execJunk.c
|
||||||
|
@ -93,7 +93,7 @@ extern TupleTableSlot *ExecutorRun(QueryDesc *queryDesc,
|
||||||
extern void ExecutorEnd(QueryDesc *queryDesc);
|
extern void ExecutorEnd(QueryDesc *queryDesc);
|
||||||
extern void ExecutorRewind(QueryDesc *queryDesc);
|
extern void ExecutorRewind(QueryDesc *queryDesc);
|
||||||
extern void ExecCheckRTPerms(List *rangeTable, CmdType operation);
|
extern void ExecCheckRTPerms(List *rangeTable, CmdType operation);
|
||||||
extern void ExecEndPlan(PlanState * planstate, EState *estate);
|
extern void ExecEndPlan(PlanState *planstate, EState *estate);
|
||||||
extern void ExecConstraints(ResultRelInfo *resultRelInfo,
|
extern void ExecConstraints(ResultRelInfo *resultRelInfo,
|
||||||
TupleTableSlot *slot, EState *estate);
|
TupleTableSlot *slot, EState *estate);
|
||||||
extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti,
|
extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti,
|
||||||
|
@ -103,9 +103,9 @@ extern TupleTableSlot *EvalPlanQual(EState *estate, Index rti,
|
||||||
* prototypes from functions in execProcnode.c
|
* prototypes from functions in execProcnode.c
|
||||||
*/
|
*/
|
||||||
extern PlanState *ExecInitNode(Plan *node, EState *estate);
|
extern PlanState *ExecInitNode(Plan *node, EState *estate);
|
||||||
extern TupleTableSlot *ExecProcNode(PlanState * node);
|
extern TupleTableSlot *ExecProcNode(PlanState *node);
|
||||||
extern int ExecCountSlotsNode(Plan *node);
|
extern int ExecCountSlotsNode(Plan *node);
|
||||||
extern void ExecEndNode(PlanState * node);
|
extern void ExecEndNode(PlanState *node);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes from functions in execQual.c
|
* prototypes from functions in execQual.c
|
||||||
|
@ -114,22 +114,22 @@ extern Datum GetAttributeByNum(TupleTableSlot *slot, AttrNumber attrno,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
extern Datum GetAttributeByName(TupleTableSlot *slot, char *attname,
|
extern Datum GetAttributeByName(TupleTableSlot *slot, char *attname,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
extern void init_fcache(Oid foid, FuncExprState * fcache,
|
extern void init_fcache(Oid foid, FuncExprState *fcache,
|
||||||
MemoryContext fcacheCxt);
|
MemoryContext fcacheCxt);
|
||||||
extern Datum ExecMakeFunctionResult(FuncExprState * fcache,
|
extern Datum ExecMakeFunctionResult(FuncExprState *fcache,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull,
|
bool *isNull,
|
||||||
ExprDoneCond *isDone);
|
ExprDoneCond *isDone);
|
||||||
extern Tuplestorestate *ExecMakeTableFunctionResult(ExprState * funcexpr,
|
extern Tuplestorestate *ExecMakeTableFunctionResult(ExprState *funcexpr,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
TupleDesc expectedDesc,
|
TupleDesc expectedDesc,
|
||||||
TupleDesc *returnDesc);
|
TupleDesc *returnDesc);
|
||||||
extern Datum ExecEvalExpr(ExprState * expression, ExprContext *econtext,
|
extern Datum ExecEvalExpr(ExprState *expression, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
extern Datum ExecEvalExprSwitchContext(ExprState * expression, ExprContext *econtext,
|
extern Datum ExecEvalExprSwitchContext(ExprState *expression, ExprContext *econtext,
|
||||||
bool *isNull, ExprDoneCond *isDone);
|
bool *isNull, ExprDoneCond *isDone);
|
||||||
extern ExprState *ExecInitExpr(Expr *node, PlanState * parent);
|
extern ExprState *ExecInitExpr(Expr *node, PlanState *parent);
|
||||||
extern SubPlanState *ExecInitExprInitPlan(SubPlan *node, PlanState * parent);
|
extern SubPlanState *ExecInitExprInitPlan(SubPlan *node, PlanState *parent);
|
||||||
extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
|
extern ExprState *ExecPrepareExpr(Expr *node, EState *estate);
|
||||||
extern bool ExecQual(List *qual, ExprContext *econtext, bool resultForNull);
|
extern bool ExecQual(List *qual, ExprContext *econtext, bool resultForNull);
|
||||||
extern int ExecTargetListLength(List *targetlist);
|
extern int ExecTargetListLength(List *targetlist);
|
||||||
|
@ -140,10 +140,10 @@ extern TupleTableSlot *ExecProject(ProjectionInfo *projInfo,
|
||||||
/*
|
/*
|
||||||
* prototypes from functions in execScan.c
|
* prototypes from functions in execScan.c
|
||||||
*/
|
*/
|
||||||
typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState * node);
|
typedef TupleTableSlot *(*ExecScanAccessMtd) (ScanState *node);
|
||||||
|
|
||||||
extern TupleTableSlot *ExecScan(ScanState * node, ExecScanAccessMtd accessMtd);
|
extern TupleTableSlot *ExecScan(ScanState *node, ExecScanAccessMtd accessMtd);
|
||||||
extern void ExecAssignScanProjectionInfo(ScanState * node);
|
extern void ExecAssignScanProjectionInfo(ScanState *node);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* prototypes from functions in execTuples.c
|
* prototypes from functions in execTuples.c
|
||||||
|
@ -160,14 +160,14 @@ extern TupleTableSlot *ExecClearTuple(TupleTableSlot *slot);
|
||||||
extern void ExecSetSlotDescriptor(TupleTableSlot *slot,
|
extern void ExecSetSlotDescriptor(TupleTableSlot *slot,
|
||||||
TupleDesc tupdesc, bool shouldFree);
|
TupleDesc tupdesc, bool shouldFree);
|
||||||
extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew);
|
extern void ExecSetSlotDescriptorIsNew(TupleTableSlot *slot, bool isNew);
|
||||||
extern void ExecInitResultTupleSlot(EState *estate, PlanState * planstate);
|
extern void ExecInitResultTupleSlot(EState *estate, PlanState *planstate);
|
||||||
extern void ExecInitScanTupleSlot(EState *estate, ScanState * scanstate);
|
extern void ExecInitScanTupleSlot(EState *estate, ScanState *scanstate);
|
||||||
extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate);
|
extern TupleTableSlot *ExecInitExtraTupleSlot(EState *estate);
|
||||||
extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate,
|
extern TupleTableSlot *ExecInitNullTupleSlot(EState *estate,
|
||||||
TupleDesc tupType);
|
TupleDesc tupType);
|
||||||
extern TupleDesc ExecTypeFromTL(List *targetList, bool hasoid);
|
extern TupleDesc ExecTypeFromTL(List *targetList, bool hasoid);
|
||||||
extern TupleDesc ExecCleanTypeFromTL(List *targetList, bool hasoid);
|
extern TupleDesc ExecCleanTypeFromTL(List *targetList, bool hasoid);
|
||||||
extern void UpdateChangedParamSet(PlanState * node, Bitmapset * newchg);
|
extern void UpdateChangedParamSet(PlanState *node, Bitmapset *newchg);
|
||||||
|
|
||||||
typedef struct TupOutputState
|
typedef struct TupOutputState
|
||||||
{
|
{
|
||||||
|
@ -224,21 +224,21 @@ extern ExprContext *MakePerTupleExprContext(EState *estate);
|
||||||
ResetExprContext((estate)->es_per_tuple_exprcontext); \
|
ResetExprContext((estate)->es_per_tuple_exprcontext); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
extern void ExecAssignExprContext(EState *estate, PlanState * planstate);
|
extern void ExecAssignExprContext(EState *estate, PlanState *planstate);
|
||||||
extern void ExecAssignResultType(PlanState * planstate,
|
extern void ExecAssignResultType(PlanState *planstate,
|
||||||
TupleDesc tupDesc, bool shouldFree);
|
TupleDesc tupDesc, bool shouldFree);
|
||||||
extern void ExecAssignResultTypeFromOuterPlan(PlanState * planstate);
|
extern void ExecAssignResultTypeFromOuterPlan(PlanState *planstate);
|
||||||
extern void ExecAssignResultTypeFromTL(PlanState * planstate);
|
extern void ExecAssignResultTypeFromTL(PlanState *planstate);
|
||||||
extern TupleDesc ExecGetResultType(PlanState * planstate);
|
extern TupleDesc ExecGetResultType(PlanState *planstate);
|
||||||
extern ProjectionInfo *ExecBuildProjectionInfo(List *targetList,
|
extern ProjectionInfo *ExecBuildProjectionInfo(List *targetList,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
TupleTableSlot *slot);
|
TupleTableSlot *slot);
|
||||||
extern void ExecAssignProjectionInfo(PlanState * planstate);
|
extern void ExecAssignProjectionInfo(PlanState *planstate);
|
||||||
extern void ExecFreeExprContext(PlanState * planstate);
|
extern void ExecFreeExprContext(PlanState *planstate);
|
||||||
extern TupleDesc ExecGetScanType(ScanState * scanstate);
|
extern TupleDesc ExecGetScanType(ScanState *scanstate);
|
||||||
extern void ExecAssignScanType(ScanState * scanstate,
|
extern void ExecAssignScanType(ScanState *scanstate,
|
||||||
TupleDesc tupDesc, bool shouldFree);
|
TupleDesc tupDesc, bool shouldFree);
|
||||||
extern void ExecAssignScanTypeFromOuterPlan(ScanState * scanstate);
|
extern void ExecAssignScanTypeFromOuterPlan(ScanState *scanstate);
|
||||||
|
|
||||||
extern void ExecOpenIndices(ResultRelInfo *resultRelInfo);
|
extern void ExecOpenIndices(ResultRelInfo *resultRelInfo);
|
||||||
extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
|
extern void ExecCloseIndices(ResultRelInfo *resultRelInfo);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nodeSeqscan.h,v 1.18 2003/08/04 02:40:13 momjian Exp $
|
* $Id: nodeSeqscan.h,v 1.19 2003/08/08 21:42:45 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
extern int ExecCountSlotsSeqScan(SeqScan *node);
|
extern int ExecCountSlotsSeqScan(SeqScan *node);
|
||||||
extern SeqScanState *ExecInitSeqScan(SeqScan *node, EState *estate);
|
extern SeqScanState *ExecInitSeqScan(SeqScan *node, EState *estate);
|
||||||
extern TupleTableSlot *ExecSeqScan(SeqScanState * node);
|
extern TupleTableSlot *ExecSeqScan(SeqScanState *node);
|
||||||
extern void ExecEndSeqScan(SeqScanState * node);
|
extern void ExecEndSeqScan(SeqScanState *node);
|
||||||
extern void ExecSeqMarkPos(SeqScanState * node);
|
extern void ExecSeqMarkPos(SeqScanState *node);
|
||||||
extern void ExecSeqRestrPos(SeqScanState * node);
|
extern void ExecSeqRestrPos(SeqScanState *node);
|
||||||
extern void ExecSeqReScan(SeqScanState * node, ExprContext *exprCtxt);
|
extern void ExecSeqReScan(SeqScanState *node, ExprContext *exprCtxt);
|
||||||
|
|
||||||
#endif /* NODESEQSCAN_H */
|
#endif /* NODESEQSCAN_H */
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: nodeSubplan.h,v 1.17 2003/08/04 02:40:13 momjian Exp $
|
* $Id: nodeSubplan.h,v 1.18 2003/08/08 21:42:45 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
#include "nodes/execnodes.h"
|
#include "nodes/execnodes.h"
|
||||||
|
|
||||||
extern void ExecInitSubPlan(SubPlanState * node, EState *estate);
|
extern void ExecInitSubPlan(SubPlanState *node, EState *estate);
|
||||||
extern Datum ExecSubPlan(SubPlanState * node,
|
extern Datum ExecSubPlan(SubPlanState *node,
|
||||||
ExprContext *econtext,
|
ExprContext *econtext,
|
||||||
bool *isNull);
|
bool *isNull);
|
||||||
extern void ExecEndSubPlan(SubPlanState * node);
|
extern void ExecEndSubPlan(SubPlanState *node);
|
||||||
extern void ExecReScanSetParamPlan(SubPlanState * node, PlanState * parent);
|
extern void ExecReScanSetParamPlan(SubPlanState *node, PlanState *parent);
|
||||||
|
|
||||||
extern void ExecSetParamPlan(SubPlanState * node, ExprContext *econtext);
|
extern void ExecSetParamPlan(SubPlanState *node, ExprContext *econtext);
|
||||||
|
|
||||||
#endif /* NODESUBPLAN_H */
|
#endif /* NODESUBPLAN_H */
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Id: getaddrinfo.h,v 1.9 2003/08/07 16:45:21 tgl Exp $
|
* $Id: getaddrinfo.h,v 1.10 2003/08/08 21:42:31 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -41,7 +41,6 @@
|
||||||
#define EAI_SERVICE -8
|
#define EAI_SERVICE -8
|
||||||
#define EAI_MEMORY -10
|
#define EAI_MEMORY -10
|
||||||
#define EAI_SYSTEM -11
|
#define EAI_SYSTEM -11
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef AI_PASSIVE
|
#ifndef AI_PASSIVE
|
||||||
|
@ -79,8 +78,7 @@ struct addrinfo
|
||||||
char *ai_canonname;
|
char *ai_canonname;
|
||||||
struct addrinfo *ai_next;
|
struct addrinfo *ai_next;
|
||||||
};
|
};
|
||||||
|
#endif /* HAVE_STRUCT_ADDRINFO */
|
||||||
#endif /* HAVE_STRUCT_ADDRINFO */
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef HAVE_GETADDRINFO
|
#ifndef HAVE_GETADDRINFO
|
||||||
|
@ -113,7 +111,6 @@ extern const char *gai_strerror(int errcode);
|
||||||
extern int getnameinfo(const struct sockaddr * sa, int salen,
|
extern int getnameinfo(const struct sockaddr * sa, int salen,
|
||||||
char *node, int nodelen,
|
char *node, int nodelen,
|
||||||
char *service, int servicelen, int flags);
|
char *service, int servicelen, int flags);
|
||||||
|
|
||||||
#endif /* HAVE_GETADDRINFO */
|
#endif /* HAVE_GETADDRINFO */
|
||||||
|
|
||||||
#endif /* GETADDRINFO_H */
|
#endif /* GETADDRINFO_H */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* Portions Copyright (c) 2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/include/getopt_long.h,v 1.3 2003/08/07 21:11:58 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/include/getopt_long.h,v 1.4 2003/08/08 21:42:31 momjian Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef GETOPT_LONG_H
|
#ifndef GETOPT_LONG_H
|
||||||
#define GETOPT_LONG_H
|
#define GETOPT_LONG_H
|
||||||
|
@ -34,7 +34,6 @@ struct option
|
||||||
|
|
||||||
#define no_argument 0
|
#define no_argument 0
|
||||||
#define required_argument 1
|
#define required_argument 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETOPT_LONG
|
#ifndef HAVE_GETOPT_LONG
|
||||||
|
@ -42,7 +41,6 @@ struct option
|
||||||
extern int getopt_long(int argc, char *const argv[],
|
extern int getopt_long(int argc, char *const argv[],
|
||||||
const char *optstring,
|
const char *optstring,
|
||||||
const struct option * longopts, int *longindex);
|
const struct option * longopts, int *longindex);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* GETOPT_LONG_H */
|
#endif /* GETOPT_LONG_H */
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (c) 2003, PostgreSQL Global Development Group
|
* Copyright (c) 2003, PostgreSQL Global Development Group
|
||||||
*
|
*
|
||||||
* $Id: bitmapset.h,v 1.3 2003/08/04 00:43:31 momjian Exp $
|
* $Id: bitmapset.h,v 1.4 2003/08/08 21:42:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -33,7 +33,7 @@ typedef struct Bitmapset
|
||||||
{
|
{
|
||||||
int nwords; /* number of words in array */
|
int nwords; /* number of words in array */
|
||||||
bitmapword words[1]; /* really [nwords] */
|
bitmapword words[1]; /* really [nwords] */
|
||||||
} Bitmapset; /* VARIABLE LENGTH STRUCT */
|
} Bitmapset; /* VARIABLE LENGTH STRUCT */
|
||||||
|
|
||||||
|
|
||||||
/* result of bms_membership */
|
/* result of bms_membership */
|
||||||
|
@ -42,42 +42,42 @@ typedef enum
|
||||||
BMS_EMPTY_SET, /* 0 members */
|
BMS_EMPTY_SET, /* 0 members */
|
||||||
BMS_SINGLETON, /* 1 member */
|
BMS_SINGLETON, /* 1 member */
|
||||||
BMS_MULTIPLE /* >1 member */
|
BMS_MULTIPLE /* >1 member */
|
||||||
} BMS_Membership;
|
} BMS_Membership;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* function prototypes in nodes/bitmapset.c
|
* function prototypes in nodes/bitmapset.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern Bitmapset *bms_copy(const Bitmapset * a);
|
extern Bitmapset *bms_copy(const Bitmapset *a);
|
||||||
extern bool bms_equal(const Bitmapset * a, const Bitmapset * b);
|
extern bool bms_equal(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_make_singleton(int x);
|
extern Bitmapset *bms_make_singleton(int x);
|
||||||
extern void bms_free(Bitmapset * a);
|
extern void bms_free(Bitmapset *a);
|
||||||
|
|
||||||
extern Bitmapset *bms_union(const Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_union(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_intersect(const Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_intersect(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_difference(const Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_difference(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern bool bms_is_subset(const Bitmapset * a, const Bitmapset * b);
|
extern bool bms_is_subset(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern bool bms_is_member(int x, const Bitmapset * a);
|
extern bool bms_is_member(int x, const Bitmapset *a);
|
||||||
extern bool bms_overlap(const Bitmapset * a, const Bitmapset * b);
|
extern bool bms_overlap(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern bool bms_nonempty_difference(const Bitmapset * a, const Bitmapset * b);
|
extern bool bms_nonempty_difference(const Bitmapset *a, const Bitmapset *b);
|
||||||
extern int bms_singleton_member(const Bitmapset * a);
|
extern int bms_singleton_member(const Bitmapset *a);
|
||||||
extern int bms_num_members(const Bitmapset * a);
|
extern int bms_num_members(const Bitmapset *a);
|
||||||
|
|
||||||
/* optimized tests when we don't need to know exact membership count: */
|
/* optimized tests when we don't need to know exact membership count: */
|
||||||
extern BMS_Membership bms_membership(const Bitmapset * a);
|
extern BMS_Membership bms_membership(const Bitmapset *a);
|
||||||
extern bool bms_is_empty(const Bitmapset * a);
|
extern bool bms_is_empty(const Bitmapset *a);
|
||||||
|
|
||||||
/* these routines recycle (modify or free) their non-const inputs: */
|
/* these routines recycle (modify or free) their non-const inputs: */
|
||||||
|
|
||||||
extern Bitmapset *bms_add_member(Bitmapset * a, int x);
|
extern Bitmapset *bms_add_member(Bitmapset *a, int x);
|
||||||
extern Bitmapset *bms_del_member(Bitmapset * a, int x);
|
extern Bitmapset *bms_del_member(Bitmapset *a, int x);
|
||||||
extern Bitmapset *bms_add_members(Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_add_members(Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_int_members(Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_int_members(Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_del_members(Bitmapset * a, const Bitmapset * b);
|
extern Bitmapset *bms_del_members(Bitmapset *a, const Bitmapset *b);
|
||||||
extern Bitmapset *bms_join(Bitmapset * a, Bitmapset * b);
|
extern Bitmapset *bms_join(Bitmapset *a, Bitmapset *b);
|
||||||
|
|
||||||
/* support for iterating through the integer elements of a set: */
|
/* support for iterating through the integer elements of a set: */
|
||||||
extern int bms_first_member(Bitmapset * a);
|
extern int bms_first_member(Bitmapset *a);
|
||||||
|
|
||||||
#endif /* BITMAPSET_H */
|
#endif /* BITMAPSET_H */
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: execnodes.h,v 1.102 2003/08/04 02:40:13 momjian Exp $
|
* $Id: execnodes.h,v 1.103 2003/08/08 21:42:47 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -348,7 +348,7 @@ typedef struct TupleHashEntryData
|
||||||
uint32 hashkey; /* exact hash key of this entry */
|
uint32 hashkey; /* exact hash key of this entry */
|
||||||
HeapTuple firstTuple; /* copy of first tuple in this group */
|
HeapTuple firstTuple; /* copy of first tuple in this group */
|
||||||
/* there may be additional data beyond the end of this struct */
|
/* there may be additional data beyond the end of this struct */
|
||||||
} TupleHashEntryData; /* VARIABLE LENGTH STRUCT */
|
} TupleHashEntryData; /* VARIABLE LENGTH STRUCT */
|
||||||
|
|
||||||
typedef struct TupleHashTableData
|
typedef struct TupleHashTableData
|
||||||
{
|
{
|
||||||
|
@ -361,13 +361,13 @@ typedef struct TupleHashTableData
|
||||||
Size entrysize; /* actual size to make each hash entry */
|
Size entrysize; /* actual size to make each hash entry */
|
||||||
int nbuckets; /* number of buckets in hash table */
|
int nbuckets; /* number of buckets in hash table */
|
||||||
TupleHashEntry buckets[1]; /* VARIABLE LENGTH ARRAY */
|
TupleHashEntry buckets[1]; /* VARIABLE LENGTH ARRAY */
|
||||||
} TupleHashTableData; /* VARIABLE LENGTH STRUCT */
|
} TupleHashTableData; /* VARIABLE LENGTH STRUCT */
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
TupleHashEntry next_entry; /* next entry in current chain */
|
TupleHashEntry next_entry; /* next entry in current chain */
|
||||||
int next_bucket; /* next chain */
|
int next_bucket; /* next chain */
|
||||||
} TupleHashIterator;
|
} TupleHashIterator;
|
||||||
|
|
||||||
#define ResetTupleHashIterator(iter) \
|
#define ResetTupleHashIterator(iter) \
|
||||||
((iter)->next_entry = NULL, \
|
((iter)->next_entry = NULL, \
|
||||||
|
@ -399,7 +399,7 @@ typedef struct ExprState
|
||||||
{
|
{
|
||||||
NodeTag type;
|
NodeTag type;
|
||||||
Expr *expr; /* associated Expr node */
|
Expr *expr; /* associated Expr node */
|
||||||
} ExprState;
|
} ExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* GenericExprState node
|
* GenericExprState node
|
||||||
|
@ -412,7 +412,7 @@ typedef struct GenericExprState
|
||||||
{
|
{
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
ExprState *arg; /* state of my child node */
|
ExprState *arg; /* state of my child node */
|
||||||
} GenericExprState;
|
} GenericExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* AggrefExprState node
|
* AggrefExprState node
|
||||||
|
@ -423,7 +423,7 @@ typedef struct AggrefExprState
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
ExprState *target; /* state of my child node */
|
ExprState *target; /* state of my child node */
|
||||||
int aggno; /* ID number for agg within its plan node */
|
int aggno; /* ID number for agg within its plan node */
|
||||||
} AggrefExprState;
|
} AggrefExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* ArrayRefExprState node
|
* ArrayRefExprState node
|
||||||
|
@ -444,7 +444,7 @@ typedef struct ArrayRefExprState
|
||||||
int16 refelemlength; /* typlen of the array element type */
|
int16 refelemlength; /* typlen of the array element type */
|
||||||
bool refelembyval; /* is the element type pass-by-value? */
|
bool refelembyval; /* is the element type pass-by-value? */
|
||||||
char refelemalign; /* typalign of the element type */
|
char refelemalign; /* typalign of the element type */
|
||||||
} ArrayRefExprState;
|
} ArrayRefExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* FuncExprState node
|
* FuncExprState node
|
||||||
|
@ -488,7 +488,7 @@ typedef struct FuncExprState
|
||||||
* data only if setArgsValid is true.
|
* data only if setArgsValid is true.
|
||||||
*/
|
*/
|
||||||
FunctionCallInfoData setArgs;
|
FunctionCallInfoData setArgs;
|
||||||
} FuncExprState;
|
} FuncExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* ScalarArrayOpExprState node
|
* ScalarArrayOpExprState node
|
||||||
|
@ -504,7 +504,7 @@ typedef struct ScalarArrayOpExprState
|
||||||
int16 typlen;
|
int16 typlen;
|
||||||
bool typbyval;
|
bool typbyval;
|
||||||
char typalign;
|
char typalign;
|
||||||
} ScalarArrayOpExprState;
|
} ScalarArrayOpExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* BoolExprState node
|
* BoolExprState node
|
||||||
|
@ -514,7 +514,7 @@ typedef struct BoolExprState
|
||||||
{
|
{
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
List *args; /* states of argument expression(s) */
|
List *args; /* states of argument expression(s) */
|
||||||
} BoolExprState;
|
} BoolExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* SubPlanState node
|
* SubPlanState node
|
||||||
|
@ -541,7 +541,7 @@ typedef struct SubPlanState
|
||||||
AttrNumber *keyColIdx; /* control data for hash tables */
|
AttrNumber *keyColIdx; /* control data for hash tables */
|
||||||
FmgrInfo *eqfunctions; /* comparison functions for hash tables */
|
FmgrInfo *eqfunctions; /* comparison functions for hash tables */
|
||||||
FmgrInfo *hashfunctions; /* lookup data for hash functions */
|
FmgrInfo *hashfunctions; /* lookup data for hash functions */
|
||||||
} SubPlanState;
|
} SubPlanState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* CaseExprState node
|
* CaseExprState node
|
||||||
|
@ -552,7 +552,7 @@ typedef struct CaseExprState
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
List *args; /* the arguments (list of WHEN clauses) */
|
List *args; /* the arguments (list of WHEN clauses) */
|
||||||
ExprState *defresult; /* the default result (ELSE clause) */
|
ExprState *defresult; /* the default result (ELSE clause) */
|
||||||
} CaseExprState;
|
} CaseExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* CaseWhenState node
|
* CaseWhenState node
|
||||||
|
@ -563,7 +563,7 @@ typedef struct CaseWhenState
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
ExprState *expr; /* condition expression */
|
ExprState *expr; /* condition expression */
|
||||||
ExprState *result; /* substitution result */
|
ExprState *result; /* substitution result */
|
||||||
} CaseWhenState;
|
} CaseWhenState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* ArrayExprState node
|
* ArrayExprState node
|
||||||
|
@ -579,7 +579,7 @@ typedef struct ArrayExprState
|
||||||
int16 elemlength; /* typlen of the array element type */
|
int16 elemlength; /* typlen of the array element type */
|
||||||
bool elembyval; /* is the element type pass-by-value? */
|
bool elembyval; /* is the element type pass-by-value? */
|
||||||
char elemalign; /* typalign of the element type */
|
char elemalign; /* typalign of the element type */
|
||||||
} ArrayExprState;
|
} ArrayExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* CoalesceExprState node
|
* CoalesceExprState node
|
||||||
|
@ -589,7 +589,7 @@ typedef struct CoalesceExprState
|
||||||
{
|
{
|
||||||
ExprState xprstate;
|
ExprState xprstate;
|
||||||
List *args; /* the arguments */
|
List *args; /* the arguments */
|
||||||
} CoalesceExprState;
|
} CoalesceExprState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* CoerceToDomainState node
|
* CoerceToDomainState node
|
||||||
|
@ -601,7 +601,7 @@ typedef struct CoerceToDomainState
|
||||||
ExprState *arg; /* input expression */
|
ExprState *arg; /* input expression */
|
||||||
/* Cached list of constraints that need to be checked */
|
/* Cached list of constraints that need to be checked */
|
||||||
List *constraints; /* list of DomainConstraintState nodes */
|
List *constraints; /* list of DomainConstraintState nodes */
|
||||||
} CoerceToDomainState;
|
} CoerceToDomainState;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DomainConstraintState - one item to check during CoerceToDomain
|
* DomainConstraintState - one item to check during CoerceToDomain
|
||||||
|
@ -614,7 +614,7 @@ typedef enum DomainConstraintType
|
||||||
{
|
{
|
||||||
DOM_CONSTRAINT_NOTNULL,
|
DOM_CONSTRAINT_NOTNULL,
|
||||||
DOM_CONSTRAINT_CHECK
|
DOM_CONSTRAINT_CHECK
|
||||||
} DomainConstraintType;
|
} DomainConstraintType;
|
||||||
|
|
||||||
typedef struct DomainConstraintState
|
typedef struct DomainConstraintState
|
||||||
{
|
{
|
||||||
|
@ -622,7 +622,7 @@ typedef struct DomainConstraintState
|
||||||
DomainConstraintType constrainttype; /* constraint type */
|
DomainConstraintType constrainttype; /* constraint type */
|
||||||
char *name; /* name of constraint (for error msgs) */
|
char *name; /* name of constraint (for error msgs) */
|
||||||
ExprState *check_expr; /* for CHECK, a boolean expression */
|
ExprState *check_expr; /* for CHECK, a boolean expression */
|
||||||
} DomainConstraintState;
|
} DomainConstraintState;
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------
|
/* ----------------------------------------------------------------
|
||||||
|
@ -681,7 +681,7 @@ typedef struct PlanState
|
||||||
ProjectionInfo *ps_ProjInfo; /* info for doing tuple projection */
|
ProjectionInfo *ps_ProjInfo; /* info for doing tuple projection */
|
||||||
bool ps_TupFromTlist;/* state flag for processing set-valued
|
bool ps_TupFromTlist;/* state flag for processing set-valued
|
||||||
* functions in targetlist */
|
* functions in targetlist */
|
||||||
} PlanState;
|
} PlanState;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* these are are defined to avoid confusion problems with "left"
|
* these are are defined to avoid confusion problems with "left"
|
||||||
|
@ -750,7 +750,7 @@ typedef struct ScanState
|
||||||
Relation ss_currentRelation;
|
Relation ss_currentRelation;
|
||||||
HeapScanDesc ss_currentScanDesc;
|
HeapScanDesc ss_currentScanDesc;
|
||||||
TupleTableSlot *ss_ScanTupleSlot;
|
TupleTableSlot *ss_ScanTupleSlot;
|
||||||
} ScanState;
|
} ScanState;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* SeqScan uses a bare ScanState as its state node, since it needs
|
* SeqScan uses a bare ScanState as its state node, since it needs
|
||||||
|
@ -1100,7 +1100,7 @@ typedef enum
|
||||||
LIMIT_SUBPLANEOF, /* at EOF of subplan (within window) */
|
LIMIT_SUBPLANEOF, /* at EOF of subplan (within window) */
|
||||||
LIMIT_WINDOWEND, /* stepped off end of window */
|
LIMIT_WINDOWEND, /* stepped off end of window */
|
||||||
LIMIT_WINDOWSTART /* stepped off beginning of window */
|
LIMIT_WINDOWSTART /* stepped off beginning of window */
|
||||||
} LimitStateCond;
|
} LimitStateCond;
|
||||||
|
|
||||||
typedef struct LimitState
|
typedef struct LimitState
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: parsenodes.h,v 1.245 2003/08/04 02:40:13 momjian Exp $
|
* $Id: parsenodes.h,v 1.246 2003/08/08 21:42:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ typedef enum QuerySource
|
||||||
QSRC_INSTEAD_RULE, /* added by unconditional INSTEAD rule */
|
QSRC_INSTEAD_RULE, /* added by unconditional INSTEAD rule */
|
||||||
QSRC_QUAL_INSTEAD_RULE, /* added by conditional INSTEAD rule */
|
QSRC_QUAL_INSTEAD_RULE, /* added by conditional INSTEAD rule */
|
||||||
QSRC_NON_INSTEAD_RULE /* added by non-INSTEAD rule */
|
QSRC_NON_INSTEAD_RULE /* added by non-INSTEAD rule */
|
||||||
} QuerySource;
|
} QuerySource;
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
|
@ -175,7 +175,7 @@ typedef enum A_Expr_Kind
|
||||||
AEXPR_DISTINCT, /* IS DISTINCT FROM - name must be "=" */
|
AEXPR_DISTINCT, /* IS DISTINCT FROM - name must be "=" */
|
||||||
AEXPR_NULLIF, /* NULLIF - name must be "=" */
|
AEXPR_NULLIF, /* NULLIF - name must be "=" */
|
||||||
AEXPR_OF /* IS (not) OF - name must be "=" or "!=" */
|
AEXPR_OF /* IS (not) OF - name must be "=" or "!=" */
|
||||||
} A_Expr_Kind;
|
} A_Expr_Kind;
|
||||||
|
|
||||||
typedef struct A_Expr
|
typedef struct A_Expr
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ typedef struct InhRelation
|
||||||
NodeTag type;
|
NodeTag type;
|
||||||
RangeVar *relation;
|
RangeVar *relation;
|
||||||
bool including_defaults;
|
bool including_defaults;
|
||||||
} InhRelation;
|
} InhRelation;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IndexElem - index parameters (used in CREATE INDEX)
|
* IndexElem - index parameters (used in CREATE INDEX)
|
||||||
|
@ -691,7 +691,7 @@ typedef enum ObjectType
|
||||||
OBJECT_TYPE,
|
OBJECT_TYPE,
|
||||||
OBJECT_USER,
|
OBJECT_USER,
|
||||||
OBJECT_VIEW
|
OBJECT_VIEW
|
||||||
} ObjectType;
|
} ObjectType;
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
* Create Schema Statement
|
* Create Schema Statement
|
||||||
|
@ -774,7 +774,7 @@ typedef struct AlterDomainStmt
|
||||||
* new owner */
|
* new owner */
|
||||||
Node *def; /* definition of default or constraint */
|
Node *def; /* definition of default or constraint */
|
||||||
DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
|
DropBehavior behavior; /* RESTRICT or CASCADE for DROP cases */
|
||||||
} AlterDomainStmt;
|
} AlterDomainStmt;
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
|
@ -879,7 +879,7 @@ typedef enum OnCommitAction
|
||||||
ONCOMMIT_PRESERVE_ROWS, /* ON COMMIT PRESERVE ROWS (do nothing) */
|
ONCOMMIT_PRESERVE_ROWS, /* ON COMMIT PRESERVE ROWS (do nothing) */
|
||||||
ONCOMMIT_DELETE_ROWS, /* ON COMMIT DELETE ROWS */
|
ONCOMMIT_DELETE_ROWS, /* ON COMMIT DELETE ROWS */
|
||||||
ONCOMMIT_DROP /* ON COMMIT DROP */
|
ONCOMMIT_DROP /* ON COMMIT DROP */
|
||||||
} OnCommitAction;
|
} OnCommitAction;
|
||||||
|
|
||||||
typedef struct CreateStmt
|
typedef struct CreateStmt
|
||||||
{
|
{
|
||||||
|
@ -1096,7 +1096,7 @@ typedef struct AlterSeqStmt
|
||||||
NodeTag type;
|
NodeTag type;
|
||||||
RangeVar *sequence; /* the sequence to alter */
|
RangeVar *sequence; /* the sequence to alter */
|
||||||
List *options;
|
List *options;
|
||||||
} AlterSeqStmt;
|
} AlterSeqStmt;
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
* Create {Aggregate|Operator|Type} Statement
|
* Create {Aggregate|Operator|Type} Statement
|
||||||
|
@ -1222,7 +1222,7 @@ typedef struct DeclareCursorStmt
|
||||||
char *portalname; /* name of the portal (cursor) */
|
char *portalname; /* name of the portal (cursor) */
|
||||||
int options; /* bitmask of options (see above) */
|
int options; /* bitmask of options (see above) */
|
||||||
Node *query; /* the SELECT query */
|
Node *query; /* the SELECT query */
|
||||||
} DeclareCursorStmt;
|
} DeclareCursorStmt;
|
||||||
|
|
||||||
/* ----------------------
|
/* ----------------------
|
||||||
* Close Portal Statement
|
* Close Portal Statement
|
||||||
|
@ -1246,7 +1246,7 @@ typedef enum FetchDirection
|
||||||
/* for these, howMany indicates a position; only one row is fetched */
|
/* for these, howMany indicates a position; only one row is fetched */
|
||||||
FETCH_ABSOLUTE,
|
FETCH_ABSOLUTE,
|
||||||
FETCH_RELATIVE
|
FETCH_RELATIVE
|
||||||
} FetchDirection;
|
} FetchDirection;
|
||||||
|
|
||||||
#define FETCH_ALL LONG_MAX
|
#define FETCH_ALL LONG_MAX
|
||||||
|
|
||||||
|
@ -1414,7 +1414,7 @@ typedef enum TransactionStmtKind
|
||||||
TRANS_STMT_START, /* semantically identical to BEGIN */
|
TRANS_STMT_START, /* semantically identical to BEGIN */
|
||||||
TRANS_STMT_COMMIT,
|
TRANS_STMT_COMMIT,
|
||||||
TRANS_STMT_ROLLBACK
|
TRANS_STMT_ROLLBACK
|
||||||
} TransactionStmtKind;
|
} TransactionStmtKind;
|
||||||
|
|
||||||
typedef struct TransactionStmt
|
typedef struct TransactionStmt
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: pg_list.h,v 1.39 2003/08/04 02:40:13 momjian Exp $
|
* $Id: pg_list.h,v 1.40 2003/08/08 21:42:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -137,7 +137,7 @@ typedef struct FastList
|
||||||
{
|
{
|
||||||
List *head;
|
List *head;
|
||||||
List *tail;
|
List *tail;
|
||||||
} FastList;
|
} FastList;
|
||||||
|
|
||||||
#define FastListInit(fl) ( (fl)->head = (fl)->tail = NIL )
|
#define FastListInit(fl) ( (fl)->head = (fl)->tail = NIL )
|
||||||
#define FastListFromList(fl, l) \
|
#define FastListFromList(fl, l) \
|
||||||
|
@ -160,11 +160,11 @@ extern List *lappend(List *list, void *datum);
|
||||||
extern List *lappendi(List *list, int datum);
|
extern List *lappendi(List *list, int datum);
|
||||||
extern List *lappendo(List *list, Oid datum);
|
extern List *lappendo(List *list, Oid datum);
|
||||||
extern List *nconc(List *list1, List *list2);
|
extern List *nconc(List *list1, List *list2);
|
||||||
extern void FastAppend(FastList * fl, void *datum);
|
extern void FastAppend(FastList *fl, void *datum);
|
||||||
extern void FastAppendi(FastList * fl, int datum);
|
extern void FastAppendi(FastList *fl, int datum);
|
||||||
extern void FastAppendo(FastList * fl, Oid datum);
|
extern void FastAppendo(FastList *fl, Oid datum);
|
||||||
extern void FastConc(FastList * fl, List *cells);
|
extern void FastConc(FastList *fl, List *cells);
|
||||||
extern void FastConcFast(FastList * fl, FastList * fl2);
|
extern void FastConcFast(FastList *fl, FastList *fl2);
|
||||||
extern void *nth(int n, List *l);
|
extern void *nth(int n, List *l);
|
||||||
extern int length(List *list);
|
extern int length(List *list);
|
||||||
extern void *llast(List *list);
|
extern void *llast(List *list);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: plannodes.h,v 1.67 2003/08/04 02:40:13 momjian Exp $
|
* $Id: plannodes.h,v 1.68 2003/08/08 21:42:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -315,7 +315,7 @@ typedef enum AggStrategy
|
||||||
AGG_PLAIN, /* simple agg across all input rows */
|
AGG_PLAIN, /* simple agg across all input rows */
|
||||||
AGG_SORTED, /* grouped agg, input must be sorted */
|
AGG_SORTED, /* grouped agg, input must be sorted */
|
||||||
AGG_HASHED /* grouped agg, use internal hashtable */
|
AGG_HASHED /* grouped agg, use internal hashtable */
|
||||||
} AggStrategy;
|
} AggStrategy;
|
||||||
|
|
||||||
typedef struct Agg
|
typedef struct Agg
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: primnodes.h,v 1.89 2003/08/04 02:40:13 momjian Exp $
|
* $Id: primnodes.h,v 1.90 2003/08/08 21:42:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -277,7 +277,7 @@ typedef enum CoercionContext
|
||||||
COERCION_IMPLICIT, /* coercion in context of expression */
|
COERCION_IMPLICIT, /* coercion in context of expression */
|
||||||
COERCION_ASSIGNMENT, /* coercion in context of assignment */
|
COERCION_ASSIGNMENT, /* coercion in context of assignment */
|
||||||
COERCION_EXPLICIT /* explicit cast operation */
|
COERCION_EXPLICIT /* explicit cast operation */
|
||||||
} CoercionContext;
|
} CoercionContext;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CoercionForm - information showing how to display a function-call node
|
* CoercionForm - information showing how to display a function-call node
|
||||||
|
@ -288,7 +288,7 @@ typedef enum CoercionForm
|
||||||
COERCE_EXPLICIT_CAST, /* display as an explicit cast */
|
COERCE_EXPLICIT_CAST, /* display as an explicit cast */
|
||||||
COERCE_IMPLICIT_CAST, /* implicit cast, so hide it */
|
COERCE_IMPLICIT_CAST, /* implicit cast, so hide it */
|
||||||
COERCE_DONTCARE /* special case for pathkeys */
|
COERCE_DONTCARE /* special case for pathkeys */
|
||||||
} CoercionForm;
|
} CoercionForm;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FuncExpr - expression node for a function call
|
* FuncExpr - expression node for a function call
|
||||||
|
@ -301,7 +301,7 @@ typedef struct FuncExpr
|
||||||
bool funcretset; /* true if function returns set */
|
bool funcretset; /* true if function returns set */
|
||||||
CoercionForm funcformat; /* how to display this function call */
|
CoercionForm funcformat; /* how to display this function call */
|
||||||
List *args; /* arguments to the function */
|
List *args; /* arguments to the function */
|
||||||
} FuncExpr;
|
} FuncExpr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* OpExpr - expression node for an operator invocation
|
* OpExpr - expression node for an operator invocation
|
||||||
|
@ -320,7 +320,7 @@ typedef struct OpExpr
|
||||||
Oid opresulttype; /* PG_TYPE OID of result value */
|
Oid opresulttype; /* PG_TYPE OID of result value */
|
||||||
bool opretset; /* true if operator returns set */
|
bool opretset; /* true if operator returns set */
|
||||||
List *args; /* arguments to the operator (1 or 2) */
|
List *args; /* arguments to the operator (1 or 2) */
|
||||||
} OpExpr;
|
} OpExpr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* DistinctExpr - expression node for "x IS DISTINCT FROM y"
|
* DistinctExpr - expression node for "x IS DISTINCT FROM y"
|
||||||
|
@ -351,7 +351,7 @@ typedef struct ScalarArrayOpExpr
|
||||||
Oid opfuncid; /* PG_PROC OID of underlying function */
|
Oid opfuncid; /* PG_PROC OID of underlying function */
|
||||||
bool useOr; /* true for ANY, false for ALL */
|
bool useOr; /* true for ANY, false for ALL */
|
||||||
List *args; /* the scalar and array operands */
|
List *args; /* the scalar and array operands */
|
||||||
} ScalarArrayOpExpr;
|
} ScalarArrayOpExpr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* BoolExpr - expression node for the basic Boolean operators AND, OR, NOT
|
* BoolExpr - expression node for the basic Boolean operators AND, OR, NOT
|
||||||
|
@ -365,14 +365,14 @@ typedef struct ScalarArrayOpExpr
|
||||||
typedef enum BoolExprType
|
typedef enum BoolExprType
|
||||||
{
|
{
|
||||||
AND_EXPR, OR_EXPR, NOT_EXPR
|
AND_EXPR, OR_EXPR, NOT_EXPR
|
||||||
} BoolExprType;
|
} BoolExprType;
|
||||||
|
|
||||||
typedef struct BoolExpr
|
typedef struct BoolExpr
|
||||||
{
|
{
|
||||||
Expr xpr;
|
Expr xpr;
|
||||||
BoolExprType boolop;
|
BoolExprType boolop;
|
||||||
List *args; /* arguments to this expression */
|
List *args; /* arguments to this expression */
|
||||||
} BoolExpr;
|
} BoolExpr;
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
* SubLink
|
* SubLink
|
||||||
|
@ -578,7 +578,7 @@ typedef struct ArrayExpr
|
||||||
Oid element_typeid; /* common type of expression elements */
|
Oid element_typeid; /* common type of expression elements */
|
||||||
List *elements; /* the array elements */
|
List *elements; /* the array elements */
|
||||||
int ndims; /* number of array dimensions */
|
int ndims; /* number of array dimensions */
|
||||||
} ArrayExpr;
|
} ArrayExpr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CoalesceExpr - a COALESCE expression
|
* CoalesceExpr - a COALESCE expression
|
||||||
|
@ -588,7 +588,7 @@ typedef struct CoalesceExpr
|
||||||
Expr xpr;
|
Expr xpr;
|
||||||
Oid coalescetype; /* type of expression result */
|
Oid coalescetype; /* type of expression result */
|
||||||
List *args; /* the arguments */
|
List *args; /* the arguments */
|
||||||
} CoalesceExpr;
|
} CoalesceExpr;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NullIfExpr - a NULLIF expression
|
* NullIfExpr - a NULLIF expression
|
||||||
|
@ -657,7 +657,7 @@ typedef struct CoerceToDomain
|
||||||
Oid resulttype; /* domain type ID (result type) */
|
Oid resulttype; /* domain type ID (result type) */
|
||||||
int32 resulttypmod; /* output typmod (currently always -1) */
|
int32 resulttypmod; /* output typmod (currently always -1) */
|
||||||
CoercionForm coercionformat; /* how to display this node */
|
CoercionForm coercionformat; /* how to display this node */
|
||||||
} CoerceToDomain;
|
} CoerceToDomain;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Placeholder node for the value to be processed by a domain's check
|
* Placeholder node for the value to be processed by a domain's check
|
||||||
|
@ -673,7 +673,7 @@ typedef struct CoerceToDomainValue
|
||||||
Expr xpr;
|
Expr xpr;
|
||||||
Oid typeId; /* type for substituted value */
|
Oid typeId; /* type for substituted value */
|
||||||
int32 typeMod; /* typemod for substituted value */
|
int32 typeMod; /* typemod for substituted value */
|
||||||
} CoerceToDomainValue;
|
} CoerceToDomainValue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Placeholder node for a DEFAULT marker in an INSERT or UPDATE command.
|
* Placeholder node for a DEFAULT marker in an INSERT or UPDATE command.
|
||||||
|
@ -687,7 +687,7 @@ typedef struct SetToDefault
|
||||||
Expr xpr;
|
Expr xpr;
|
||||||
Oid typeId; /* type for substituted value */
|
Oid typeId; /* type for substituted value */
|
||||||
int32 typeMod; /* typemod for substituted value */
|
int32 typeMod; /* typemod for substituted value */
|
||||||
} SetToDefault;
|
} SetToDefault;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* TargetEntry -
|
* TargetEntry -
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: relation.h,v 1.84 2003/08/04 02:40:13 momjian Exp $
|
* $Id: relation.h,v 1.85 2003/08/08 21:42:48 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -43,7 +43,7 @@ typedef struct QualCost
|
||||||
{
|
{
|
||||||
Cost startup; /* one-time cost */
|
Cost startup; /* one-time cost */
|
||||||
Cost per_tuple; /* per-evaluation cost */
|
Cost per_tuple; /* per-evaluation cost */
|
||||||
} QualCost;
|
} QualCost;
|
||||||
|
|
||||||
/*----------
|
/*----------
|
||||||
* RelOptInfo
|
* RelOptInfo
|
||||||
|
@ -415,7 +415,7 @@ typedef struct ResultPath
|
||||||
Path path;
|
Path path;
|
||||||
Path *subpath;
|
Path *subpath;
|
||||||
List *constantqual;
|
List *constantqual;
|
||||||
} ResultPath;
|
} ResultPath;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* MaterialPath represents use of a Material plan node, i.e., caching of
|
* MaterialPath represents use of a Material plan node, i.e., caching of
|
||||||
|
@ -427,7 +427,7 @@ typedef struct MaterialPath
|
||||||
{
|
{
|
||||||
Path path;
|
Path path;
|
||||||
Path *subpath;
|
Path *subpath;
|
||||||
} MaterialPath;
|
} MaterialPath;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UniquePath represents elimination of distinct rows from the output of
|
* UniquePath represents elimination of distinct rows from the output of
|
||||||
|
@ -444,7 +444,7 @@ typedef struct UniquePath
|
||||||
Path *subpath;
|
Path *subpath;
|
||||||
bool use_hash;
|
bool use_hash;
|
||||||
double rows; /* estimated number of result tuples */
|
double rows; /* estimated number of result tuples */
|
||||||
} UniquePath;
|
} UniquePath;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All join-type paths share these fields.
|
* All join-type paths share these fields.
|
||||||
|
@ -690,7 +690,7 @@ typedef struct InnerIndexscanInfo
|
||||||
bool isouterjoin; /* true if join is outer */
|
bool isouterjoin; /* true if join is outer */
|
||||||
/* Best path for this lookup key: */
|
/* Best path for this lookup key: */
|
||||||
Path *best_innerpath; /* best inner indexscan, or NULL if none */
|
Path *best_innerpath; /* best inner indexscan, or NULL if none */
|
||||||
} InnerIndexscanInfo;
|
} InnerIndexscanInfo;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IN clause info.
|
* IN clause info.
|
||||||
|
@ -712,6 +712,6 @@ typedef struct InClauseInfo
|
||||||
* Note: sub_targetlist is just a list of Vars or expressions; it does
|
* Note: sub_targetlist is just a list of Vars or expressions; it does
|
||||||
* not contain TargetEntry nodes.
|
* not contain TargetEntry nodes.
|
||||||
*/
|
*/
|
||||||
} InClauseInfo;
|
} InClauseInfo;
|
||||||
|
|
||||||
#endif /* RELATION_H */
|
#endif /* RELATION_H */
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: clauses.h,v 1.67 2003/08/04 02:40:13 momjian Exp $
|
* $Id: clauses.h,v 1.68 2003/08/08 21:42:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -60,7 +60,7 @@ extern bool has_distinct_on_clause(Query *query);
|
||||||
|
|
||||||
extern void clause_get_relids_vars(Node *clause, Relids *relids, List **vars);
|
extern void clause_get_relids_vars(Node *clause, Relids *relids, List **vars);
|
||||||
extern int NumRelids(Node *clause);
|
extern int NumRelids(Node *clause);
|
||||||
extern void CommuteClause(OpExpr * clause);
|
extern void CommuteClause(OpExpr *clause);
|
||||||
|
|
||||||
extern Node *eval_const_expressions(Node *node);
|
extern Node *eval_const_expressions(Node *node);
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: cost.h,v 1.56 2003/08/04 02:40:13 momjian Exp $
|
* $Id: cost.h,v 1.57 2003/08/08 21:42:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -75,7 +75,7 @@ extern void cost_group(Path *path, Query *root,
|
||||||
extern void cost_nestloop(NestPath *path, Query *root);
|
extern void cost_nestloop(NestPath *path, Query *root);
|
||||||
extern void cost_mergejoin(MergePath *path, Query *root);
|
extern void cost_mergejoin(MergePath *path, Query *root);
|
||||||
extern void cost_hashjoin(HashPath *path, Query *root);
|
extern void cost_hashjoin(HashPath *path, Query *root);
|
||||||
extern void cost_qual_eval(QualCost * cost, List *quals);
|
extern void cost_qual_eval(QualCost *cost, List *quals);
|
||||||
extern void set_baserel_size_estimates(Query *root, RelOptInfo *rel);
|
extern void set_baserel_size_estimates(Query *root, RelOptInfo *rel);
|
||||||
extern void set_joinrel_size_estimates(Query *root, RelOptInfo *rel,
|
extern void set_joinrel_size_estimates(Query *root, RelOptInfo *rel,
|
||||||
RelOptInfo *outer_rel,
|
RelOptInfo *outer_rel,
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: planmain.h,v 1.74 2003/08/04 02:40:14 momjian Exp $
|
* $Id: planmain.h,v 1.75 2003/08/08 21:42:50 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -69,6 +69,6 @@ extern void process_implied_equality(Query *root,
|
||||||
*/
|
*/
|
||||||
extern void set_plan_references(Plan *plan, List *rtable);
|
extern void set_plan_references(Plan *plan, List *rtable);
|
||||||
extern void fix_opfuncids(Node *node);
|
extern void fix_opfuncids(Node *node);
|
||||||
extern void set_opfuncid(OpExpr * opexpr);
|
extern void set_opfuncid(OpExpr *opexpr);
|
||||||
|
|
||||||
#endif /* PLANMAIN_H */
|
#endif /* PLANMAIN_H */
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: port.h,v 1.11 2003/08/08 04:52:22 momjian Exp $
|
* $Id: port.h,v 1.12 2003/08/08 21:42:31 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -18,16 +18,16 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Portable path handling for Unix/Win32 */
|
/* Portable path handling for Unix/Win32 */
|
||||||
extern bool is_absolute_path(const char *filename);
|
extern bool is_absolute_path(const char *filename);
|
||||||
extern char *first_path_separator(const char *filename);
|
extern char *first_path_separator(const char *filename);
|
||||||
extern char *last_path_separator(const char *filename);
|
extern char *last_path_separator(const char *filename);
|
||||||
extern char *get_progname(char *argv0);
|
extern char *get_progname(char *argv0);
|
||||||
|
|
||||||
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
|
extern char *simple_prompt(const char *prompt, int maxlen, bool echo);
|
||||||
|
|
||||||
#if defined(bsdi) || defined(netbsd)
|
#if defined(bsdi) || defined(netbsd)
|
||||||
extern int fseeko(FILE *stream, off_t offset, int whence);
|
extern int fseeko(FILE *stream, off_t offset, int whence);
|
||||||
extern off_t ftello(FILE *stream);
|
extern off_t ftello(FILE *stream);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
@ -35,8 +35,8 @@ extern off_t ftello(FILE *stream);
|
||||||
* Win32 doesn't have reliable rename/unlink during concurrent access
|
* Win32 doesn't have reliable rename/unlink during concurrent access
|
||||||
*/
|
*/
|
||||||
#ifndef FRONTEND
|
#ifndef FRONTEND
|
||||||
extern int pgrename(const char *from, const char *to);
|
extern int pgrename(const char *from, const char *to);
|
||||||
extern int pgunlink(const char *path);
|
extern int pgunlink(const char *path);
|
||||||
|
|
||||||
#define rename(from, to) pgrename(from, to)
|
#define rename(from, to) pgrename(from, to)
|
||||||
#define unlink(path) pgunlink(path)
|
#define unlink(path) pgunlink(path)
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* $Id: regex.h,v 1.24 2003/08/04 00:43:32 momjian Exp $
|
* $Id: regex.h,v 1.25 2003/08/08 21:42:51 momjian Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -89,7 +89,7 @@ typedef struct
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
regmatch_t rm_extend; /* see REG_EXPECT */
|
regmatch_t rm_extend; /* see REG_EXPECT */
|
||||||
} rm_detail_t;
|
} rm_detail_t;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: freespace.h,v 1.12 2003/08/04 02:40:14 momjian Exp $
|
* $Id: freespace.h,v 1.13 2003/08/08 21:42:51 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -25,7 +25,7 @@ typedef struct PageFreeSpaceInfo
|
||||||
{
|
{
|
||||||
BlockNumber blkno; /* which page in relation */
|
BlockNumber blkno; /* which page in relation */
|
||||||
Size avail; /* space available on this page */
|
Size avail; /* space available on this page */
|
||||||
} PageFreeSpaceInfo;
|
} PageFreeSpaceInfo;
|
||||||
|
|
||||||
|
|
||||||
/* GUC variables */
|
/* GUC variables */
|
||||||
|
@ -47,7 +47,7 @@ extern BlockNumber RecordAndGetPageWithFreeSpace(RelFileNode *rel,
|
||||||
extern Size GetAvgFSMRequestSize(RelFileNode *rel);
|
extern Size GetAvgFSMRequestSize(RelFileNode *rel);
|
||||||
extern void RecordRelationFreeSpace(RelFileNode *rel,
|
extern void RecordRelationFreeSpace(RelFileNode *rel,
|
||||||
int nPages,
|
int nPages,
|
||||||
PageFreeSpaceInfo * pageSpaces);
|
PageFreeSpaceInfo *pageSpaces);
|
||||||
|
|
||||||
extern BlockNumber GetFreeIndexPage(RelFileNode *rel);
|
extern BlockNumber GetFreeIndexPage(RelFileNode *rel);
|
||||||
extern void RecordIndexFreeSpace(RelFileNode *rel,
|
extern void RecordIndexFreeSpace(RelFileNode *rel,
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: dest.h,v 1.41 2003/08/06 17:46:46 tgl Exp $
|
* $Id: dest.h,v 1.42 2003/08/08 21:42:52 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -108,8 +108,8 @@ struct _DestReceiver
|
||||||
DestReceiver *self);
|
DestReceiver *self);
|
||||||
/* Per-executor-run initialization and shutdown: */
|
/* Per-executor-run initialization and shutdown: */
|
||||||
void (*rStartup) (DestReceiver *self,
|
void (*rStartup) (DestReceiver *self,
|
||||||
int operation,
|
int operation,
|
||||||
TupleDesc typeinfo);
|
TupleDesc typeinfo);
|
||||||
void (*rShutdown) (DestReceiver *self);
|
void (*rShutdown) (DestReceiver *self);
|
||||||
/* Destroy the receiver object itself (if dynamically allocated) */
|
/* Destroy the receiver object itself (if dynamically allocated) */
|
||||||
void (*rDestroy) (DestReceiver *self);
|
void (*rDestroy) (DestReceiver *self);
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue