pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Tweak the core scanner so that it can be used by plpgsql too.
2+ messages / 2 participants
[nested] [flat]
* pgsql: Tweak the core scanner so that it can be used by plpgsql too.
@ 2009-07-14 20:24 Tom Lane <tgl@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: tgl@postgresql.org @ 2009-07-14 20:24 UTC (permalink / raw)
To: pgsql-committers
Log Message:
-----------
Tweak the core scanner so that it can be used by plpgsql too.
Changes:
Pass in the keyword lookup array instead of having it be hardwired.
(This incidentally allows elimination of some duplicate coding in ecpg.)
Re-order the token declarations in gram.y so that non-keyword tokens have
numbers that won't change when keywords are added or removed.
Add ".." and ":=" to the set of tokens recognized by scan.l. (Since these
combinations are nowhere legal in core SQL, this does not change anything
except the precise wording of the error you get when you write this.)
Modified Files:
--------------
pgsql/src/backend/parser:
gram.y (r2.668 -> r2.669)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/gram.y?r1=2.668&r2=2.669)
keywords.c (r1.213 -> r1.214)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/keywords.c?r1=1.213&r2=1.214)
kwlookup.c (r2.2 -> r2.3)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/kwlookup.c?r1=2.2&r2=2.3)
parser.c (r1.80 -> r1.81)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parser.c?r1=1.80&r2=1.81)
scan.l (r1.156 -> r1.157)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/scan.l?r1=1.156&r2=1.157)
pgsql/src/backend/utils/adt:
misc.c (r1.71 -> r1.72)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/misc.c?r1=1.71&r2=1.72)
ruleutils.c (r1.301 -> r1.302)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c?r1=1.301&r2=1.3...)
pgsql/src/bin/pg_dump:
dumputils.c (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/dumputils.c?r1=1.46&r2=1.47)
keywords.c (r1.3 -> r1.4)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/keywords.c?r1=1.3&r2=1.4)
pgsql/src/include/parser:
gramparse.h (r1.46 -> r1.47)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/gramparse.h?r1=1.46&r2=1.47)
keywords.h (r1.26 -> r1.27)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/parser/keywords.h?r1=1.26&r2=1.27)
pgsql/src/interfaces/ecpg/preproc:
c_keywords.c (r1.23 -> r1.24)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/c_keywords.c?r1=1.23&...)
ecpg_keywords.c (r1.40 -> r1.41)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/ecpg_keywords.c?r1=1.40&a...)
extern.h (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/extern.h?r1=1.73&r2=1...)
keywords.c (r1.88 -> r1.89)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/ecpg/preproc/keywords.c?r1=1.88&r2...)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Add destroyStringInfo function for cleaning up StringInfos
@ 2024-03-16 22:22 Daniel Gustafsson <dgustafsson@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Gustafsson @ 2024-03-16 22:22 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Add destroyStringInfo function for cleaning up StringInfos
destroyStringInfo() is a counterpart to makeStringInfo(), freeing a
palloc'd StringInfo and its data. This is a convenience function to
align the StringInfo API with the PQExpBuffer API. Originally added
in the OAuth patchset, it was extracted and committed separately in
order to aid upcoming JSON work.
Author: Daniel Gustafsson <daniel@yesql.se>
Author: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi+mWdTd6ujtyF7MsvXvk7ToLRVG_tYAcaGbQLvf=N4KrQw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b7831865159d5fb6f0d263e6023f0986589fe254
Modified Files
--------------
src/backend/backup/basebackup.c | 3 +--
src/backend/commands/subscriptioncmds.c | 3 +--
src/backend/utils/adt/jsonb.c | 3 +--
src/backend/utils/adt/xml.c | 6 ++----
src/bin/pg_combinebackup/pg_combinebackup.c | 5 +----
src/common/stringinfo.c | 16 ++++++++++++++++
src/include/lib/stringinfo.h | 9 ++++++++-
src/test/regress/pg_regress.c | 3 +--
8 files changed, 31 insertions(+), 17 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-03-16 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 20:24 pgsql: Tweak the core scanner so that it can be used by plpgsql too. Tom Lane <tgl@postgresql.org>
2024-03-16 22:22 pgsql: Add destroyStringInfo function for cleaning up StringInfos Daniel Gustafsson <dgustafsson@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox