diff options
author | Bruce Momjian <bruce@momjian.us> | 1998-01-07 18:47:07 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 1998-01-07 18:47:07 +0000 |
commit | e6c6146eb8129f1ea1e1f68ef739c13824357225 (patch) | |
tree | 87cb303b9803a3494e74ca7efc760ed6187c667d /src/backend/commands/variable.c | |
parent | 7a2a7d436dac73e2b983224458887749078e9796 (diff) | |
download | postgresql-e6c6146eb8129f1ea1e1f68ef739c13824357225.tar.gz postgresql-e6c6146eb8129f1ea1e1f68ef739c13824357225.zip |
Allow varchar() to only store needed bytes. Remove PALLOC,PALLOCTYPE,PFREE. Clean up use of VARDATA.
Diffstat (limited to 'src/backend/commands/variable.c')
-rw-r--r-- | src/backend/commands/variable.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/commands/variable.c b/src/backend/commands/variable.c index 8ee7e777af8..8193b6cb917 100644 --- a/src/backend/commands/variable.c +++ b/src/backend/commands/variable.c @@ -2,7 +2,7 @@ * Routines for handling of 'SET var TO', * 'SHOW var' and 'RESET var' statements. * - * $Id: variable.c,v 1.1 1998/01/05 18:42:50 momjian Exp $ + * $Id: variable.c,v 1.2 1998/01/07 18:46:26 momjian Exp $ * */ @@ -73,7 +73,7 @@ get_token(char **tok, char **val, const char *str) len++; } - *tok = (char *) PALLOC(len + 1); + *tok = (char *) palloc(len + 1); StrNCpy(*tok, start, len+1); /* skip white spaces */ @@ -119,7 +119,7 @@ get_token(char **tok, char **val, const char *str) len++; } - *val = (char *) PALLOC(len + 1); + *val = (char *) palloc(len + 1); StrNCpy(*val, start, len+1); /* skip white spaces */ @@ -186,7 +186,7 @@ parse_geqo(const char *value) geqo_rels = pg_atoi(val, sizeof(int32), '\0'); if (geqo_rels <= 1) elog(ERROR, "Bad value for # of relations (%s)", val); - PFREE(val); + pfree(val); } _use_geqo_ = true; _use_geqo_rels_ = geqo_rels; @@ -200,7 +200,7 @@ parse_geqo(const char *value) else elog(ERROR, "Bad value for GEQO (%s)", value); - PFREE(tok); + pfree(tok); return TRUE; } @@ -394,7 +394,7 @@ parse_date(const char *value) { elog(ERROR, "Bad value for date style (%s)", tok); } - PFREE(tok); + pfree(tok); } if (dcnt > 1 || ecnt > 1) @@ -493,7 +493,7 @@ parse_timezone(const char *value) elog(ERROR, "Unable to set TZ environment variable to %s", tok); tzset(); - PFREE(tok); + pfree(tok); } return TRUE; |