summaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorTom Lane2015-05-24 19:04:10 +0000
committerTom Lane2015-05-24 19:04:10 +0000
commit2aa0476dc38f7e510b8cde627e83b4c76fa05d61 (patch)
tree19dad7292f6cad84a485e9670c786b2f1dcd3c18 /src/backend/access
parent17b48a1a9f87f7479d38dcc78a27c23f1f8124f8 (diff)
Manual cleanup of pgindent results.
Fix some places where pgindent did silly stuff, often because project style wasn't followed to begin with. (I've not touched the atomics headers, though.)
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/tablesample/bernoulli.c15
-rw-r--r--src/backend/access/tablesample/tablesample.c9
2 files changed, 12 insertions, 12 deletions
diff --git a/src/backend/access/tablesample/bernoulli.c b/src/backend/access/tablesample/bernoulli.c
index 563a9168f0f..0a539008221 100644
--- a/src/backend/access/tablesample/bernoulli.c
+++ b/src/backend/access/tablesample/bernoulli.c
@@ -80,8 +80,7 @@ Datum
tsm_bernoulli_nextblock(PG_FUNCTION_ARGS)
{
TableSampleDesc *tsdesc = (TableSampleDesc *) PG_GETARG_POINTER(0);
- BernoulliSamplerData *sampler =
- (BernoulliSamplerData *) tsdesc->tsmdata;
+ BernoulliSamplerData *sampler = (BernoulliSamplerData *) tsdesc->tsmdata;
/*
* Bernoulli sampling scans all blocks on the table and supports syncscan
@@ -117,10 +116,10 @@ tsm_bernoulli_nextblock(PG_FUNCTION_ARGS)
* tuples have same probability of being returned the visible and invisible
* tuples will be returned in same ratio as they have in the actual table.
* This means that there is no skew towards either visible or invisible tuples
- * and the number returned visible tuples to from the executor node is the
- * fraction of visible tuples which was specified in input.
+ * and the number of visible tuples returned from the executor node should
+ * match the fraction of visible tuples which was specified by user.
*
- * This is faster than doing the coinflip in the examinetuple because we don't
+ * This is faster than doing the coinflip in examinetuple because we don't
* have to do visibility checks on uninteresting tuples.
*
* If we reach end of the block return InvalidOffsetNumber which tells
@@ -131,8 +130,7 @@ tsm_bernoulli_nexttuple(PG_FUNCTION_ARGS)
{
TableSampleDesc *tsdesc = (TableSampleDesc *) PG_GETARG_POINTER(0);
OffsetNumber maxoffset = PG_GETARG_UINT16(2);
- BernoulliSamplerData *sampler =
- (BernoulliSamplerData *) tsdesc->tsmdata;
+ BernoulliSamplerData *sampler = (BernoulliSamplerData *) tsdesc->tsmdata;
OffsetNumber tupoffset = sampler->lt;
float4 probability = sampler->probability;
@@ -185,8 +183,7 @@ Datum
tsm_bernoulli_reset(PG_FUNCTION_ARGS)
{
TableSampleDesc *tsdesc = (TableSampleDesc *) PG_GETARG_POINTER(0);
- BernoulliSamplerData *sampler =
- (BernoulliSamplerData *) tsdesc->tsmdata;
+ BernoulliSamplerData *sampler = (BernoulliSamplerData *) tsdesc->tsmdata;
sampler->blockno = InvalidBlockNumber;
sampler->lt = InvalidOffsetNumber;
diff --git a/src/backend/access/tablesample/tablesample.c b/src/backend/access/tablesample/tablesample.c
index 3398d02f854..44a24340f6b 100644
--- a/src/backend/access/tablesample/tablesample.c
+++ b/src/backend/access/tablesample/tablesample.c
@@ -78,9 +78,12 @@ tablesample_init(SampleScanState *scanstate, TableSampleClause *tablesample)
fcinfo.argnull[0] = false;
/*
- * Second arg for init function is always REPEATABLE When
- * tablesample->repeatable is NULL then REPEATABLE clause was not
- * specified. When specified, the expression cannot evaluate to NULL.
+ * Second arg for init function is always REPEATABLE.
+ *
+ * If tablesample->repeatable is NULL then REPEATABLE clause was not
+ * specified, and we insert a random value as default.
+ *
+ * When specified, the expression cannot evaluate to NULL.
*/
if (tablesample->repeatable)
{