Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
20e82a7c
Commit
20e82a7c
authored
Mar 21, 2008
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Give an explicit error for serial[], rather than silently ignoring
the array decoration as the code had been doing.
parent
4b7ae4af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/backend/parser/parse_utilcmd.c
src/backend/parser/parse_utilcmd.c
+13
-2
No files found.
src/backend/parser/parse_utilcmd.c
View file @
20e82a7c
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.
9 2008/02/07 17:09:51
tgl Exp $
* $PostgreSQL: pgsql/src/backend/parser/parse_utilcmd.c,v 2.
10 2008/03/21 22:10:56
tgl Exp $
*
*
*-------------------------------------------------------------------------
*-------------------------------------------------------------------------
*/
*/
...
@@ -266,7 +266,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
...
@@ -266,7 +266,8 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
/* Check for SERIAL pseudo-types */
/* Check for SERIAL pseudo-types */
is_serial
=
false
;
is_serial
=
false
;
if
(
list_length
(
column
->
typename
->
names
)
==
1
)
if
(
list_length
(
column
->
typename
->
names
)
==
1
&&
!
column
->
typename
->
pct_type
)
{
{
char
*
typname
=
strVal
(
linitial
(
column
->
typename
->
names
));
char
*
typname
=
strVal
(
linitial
(
column
->
typename
->
names
));
...
@@ -284,6 +285,16 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
...
@@ -284,6 +285,16 @@ transformColumnDefinition(ParseState *pstate, CreateStmtContext *cxt,
column
->
typename
->
names
=
NIL
;
column
->
typename
->
names
=
NIL
;
column
->
typename
->
typeid
=
INT8OID
;
column
->
typename
->
typeid
=
INT8OID
;
}
}
/*
* We have to reject "serial[]" explicitly, because once we've
* set typeid, LookupTypeName won't notice arrayBounds. We don't
* need any special coding for serial(typmod) though.
*/
if
(
is_serial
&&
column
->
typename
->
arrayBounds
!=
NIL
)
ereport
(
ERROR
,
(
errcode
(
ERRCODE_FEATURE_NOT_SUPPORTED
),
errmsg
(
"array of serial is not implemented"
)));
}
}
/* Do necessary work on the column type declaration */
/* Do necessary work on the column type declaration */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment