mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Fix inconsistencies and typos in the tree, take 10
This addresses some issues with unnecessary code comments, fixes various typos in docs and comments, and removes some orphaned structures and definitions. Author: Alexander Lakhin Discussion: https://postgr.es/m/9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com
This commit is contained in:
@ -191,7 +191,7 @@ dmetaphone_alt(PG_FUNCTION_ARGS)
|
||||
(v = (t*)repalloc((v),((n)*sizeof(t))))
|
||||
|
||||
/*
|
||||
* Don't do pfree - it seems to cause a segv sometimes - which might have just
|
||||
* Don't do pfree - it seems to cause a SIGSEGV sometimes - which might have just
|
||||
* been caused by reloading the module in development.
|
||||
* So we rely on context cleanup - Tom Lane says pfree shouldn't be necessary
|
||||
* in a case like this.
|
||||
|
@ -166,7 +166,7 @@ pushquery(QPRS_STATE *state, int32 type, int32 val, int32 distance, int32 lenval
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is used for query_txt parsing
|
||||
* This function is used for query text parsing
|
||||
*/
|
||||
static void
|
||||
pushval_asis(QPRS_STATE *state, int type, char *strval, int lenval, uint16 flag)
|
||||
|
@ -39,25 +39,6 @@
|
||||
#include "blf.h"
|
||||
#include "rijndael.h"
|
||||
|
||||
/*
|
||||
* System reseeds should be separated at least this much.
|
||||
*/
|
||||
#define SYSTEM_RESEED_MIN (20*60) /* 20 min */
|
||||
/*
|
||||
* How often to roll dice.
|
||||
*/
|
||||
#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */
|
||||
/*
|
||||
* The chance is x/256 that the reseed happens.
|
||||
*/
|
||||
#define SYSTEM_RESEED_CHANCE (4) /* 256/4 * 10min ~ 10h */
|
||||
|
||||
/*
|
||||
* If this much time has passed, force reseed.
|
||||
*/
|
||||
#define SYSTEM_RESEED_MAX (12*60*60) /* 12h */
|
||||
|
||||
|
||||
#ifndef MD5_DIGEST_LENGTH
|
||||
#define MD5_DIGEST_LENGTH 16
|
||||
#endif
|
||||
|
@ -423,7 +423,7 @@ static struct PullFilterOps mdc_filter = {
|
||||
/*
|
||||
* Combined Pkt reader and MDC hasher.
|
||||
*
|
||||
* For the case of SYMENCRYPTED_MDC packet, where
|
||||
* For the case of SYMENCRYPTED_DATA_MDC packet, where
|
||||
* the data part has 'context length', which means
|
||||
* that data packet ends 22 bytes before end of parent
|
||||
* packet, which is silly.
|
||||
@ -894,7 +894,10 @@ process_data_packets(PGP_Context *ctx, MBuf *dst, PullFilter *src,
|
||||
break;
|
||||
}
|
||||
|
||||
/* context length inside SYMENC_MDC needs special handling */
|
||||
/*
|
||||
* Context length inside SYMENCRYPTED_DATA_MDC packet needs special
|
||||
* handling.
|
||||
*/
|
||||
if (need_mdc && res == PKT_CONTEXT)
|
||||
res = pullf_create(&pkt, &mdcbuf_filter, ctx, src);
|
||||
else
|
||||
|
@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst)
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* initialize symkey
|
||||
* initialize sym_key
|
||||
*/
|
||||
if (ctx->sym_key)
|
||||
{
|
||||
|
@ -279,7 +279,7 @@ int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen);
|
||||
|
||||
typedef struct PGP_CFB PGP_CFB;
|
||||
int pgp_cfb_create(PGP_CFB **ctx_p, int algo,
|
||||
const uint8 *key, int key_len, int recync, uint8 *iv);
|
||||
const uint8 *key, int key_len, int resync, uint8 *iv);
|
||||
void pgp_cfb_free(PGP_CFB *ctx);
|
||||
int pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
|
||||
int pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst);
|
||||
|
@ -653,7 +653,7 @@ sepgsql_mcstrans_out(PG_FUNCTION_ARGS)
|
||||
}
|
||||
|
||||
/*
|
||||
* quote_object_names
|
||||
* quote_object_name
|
||||
*
|
||||
* It tries to quote the supplied identifiers
|
||||
*/
|
||||
|
@ -657,10 +657,8 @@ sepgsql_getenforce(void)
|
||||
/*
|
||||
* sepgsql_audit_log
|
||||
*
|
||||
* It generates a security audit record. In the default, it writes out
|
||||
* audit records into standard PG's logfile. It also allows to set up
|
||||
* external audit log receiver, such as auditd in Linux, using the
|
||||
* sepgsql_audit_hook.
|
||||
* It generates a security audit record. It writes out audit records
|
||||
* into standard PG's logfile.
|
||||
*
|
||||
* SELinux can control what should be audited and should not using
|
||||
* "auditdeny" and "auditallow" rules in the security policy. In the
|
||||
|
@ -5,7 +5,7 @@ CREATE TABLE A (
|
||||
);
|
||||
CREATE UNIQUE INDEX AI ON A (ID);
|
||||
|
||||
--Columns REFB of table B and REFC of C are foreign keys referenting ID of A:
|
||||
--Columns REFB of table B and REFC of C are foreign keys referencing ID of A:
|
||||
|
||||
CREATE TABLE B (
|
||||
REFB int4
|
||||
|
Reference in New Issue
Block a user