pgsql: Move strtoint() to common

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Move strtoint() to common
Date: 2018-03-13 14:21:52
Message-ID: E1evkoK-0006CC-Ce@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move strtoint() to common

Several places used similar code to convert a string to an int, so take
the function that we already had and make it globally available.

Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/17bb62501787c56e0518e61db13a523d47afd724

Modified Files
--------------
src/backend/nodes/read.c | 12 +++++-------
src/backend/parser/scan.l | 9 ++++-----
src/backend/utils/adt/datetime.c | 18 +-----------------
src/common/string.c | 15 +++++++++++++++
src/include/common/string.h | 1 +
src/interfaces/ecpg/pgtypeslib/.gitignore | 1 +
src/interfaces/ecpg/pgtypeslib/Makefile | 6 +++++-
src/interfaces/ecpg/pgtypeslib/interval.c | 16 ++--------------
src/interfaces/ecpg/preproc/pgc.l | 10 +++++-----
9 files changed, 39 insertions(+), 49 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2018-03-13 15:21:37 pgsql: Set connection back to NULL after freeing it.
Previous Message Alvaro Herrera 2018-03-12 22:44:53 pgsql: Avoid having two PKs in a partition