Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4c310ec

Browse files
committed
Arrange for quote_identifier() and pg_dump to not quote keywords that are
unreserved according to the grammar. The list of unreserved words has gottenextensive enough that the unnecessary quoting is becoming a bit of an eyesore.To do this, add knowledge of the keyword category to keywords.c's table.(Someday we might be able to generate keywords.c's table and the keyword listsin gram.y from a common source.) For the moment, lie about WITH's status inthe table so it will still get quoted --- this is because of the expectationthat WITH will become reserved when the SQL recursive-queries patch gets done.I didn't force initdb because this affects nothing on-disk; but note that afew regression tests have changed expected output.
1 parent5328340 commit4c310ec

File tree

10 files changed

+463
-429
lines changed

10 files changed

+463
-429
lines changed

‎src/backend/parser/gram.y

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.594 2007/06/15 20:56:49 tgl Exp $
14+
* $PostgreSQL: pgsql/src/backend/parser/gram.y,v 2.595 2007/06/18 21:40:57 tgl Exp $
1515
*
1616
* HISTORY
1717
* AUTHORDATEMAJOR EVENT
@@ -8787,12 +8787,16 @@ ColLabel:IDENT{ $$ = $1; }
87878787

87888788

87898789
/*
8790-
* Keywordclassification lists. Generally, every keyword present in
8790+
* Keywordcategory lists. Generally, every keyword present in
87918791
* the Postgres grammar should appear in exactly one of these lists.
87928792
*
87938793
* Put a new keyword into the first list that it can go into without causing
87948794
* shift or reduce conflicts. The earlier lists define "less reserved"
87958795
* categories of keywords.
8796+
*
8797+
* Make sure that each keyword's category in keywords.c matches where
8798+
* it is listed here. (Someday we may be able to generate these lists and
8799+
* keywords.c's table from a common master list.)
87968800
*/
87978801

87988802
/* "Unreserved" keywords --- available for use as any kind of name.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp