mirror of
https://github.com/postgres/postgres.git
synced 2025-10-24 01:29:19 +03:00
Add location field to DefElem
Add a location field to the DefElem struct, used to parse many utility commands. Update various error messages to supply error position information. To propogate the error position information in a more systematic way, create a ParseState in standard_ProcessUtility() and pass that to interested functions implementing the utility commands. This seems better than passing the query string and then reassembling a parse state ad hoc, which violates the encapsulation of the ParseState type. Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "catalog/objectaddress.h"
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "parser/parse_node.h"
|
||||
|
||||
|
||||
/* Hook to check passwords in CreateRole() and AlterRole() */
|
||||
@@ -23,7 +24,7 @@ typedef void (*check_password_hook_type) (const char *username, const char *pass
|
||||
|
||||
extern PGDLLIMPORT check_password_hook_type check_password_hook;
|
||||
|
||||
extern Oid CreateRole(CreateRoleStmt *stmt);
|
||||
extern Oid CreateRole(ParseState *pstate, CreateRoleStmt *stmt);
|
||||
extern Oid AlterRole(AlterRoleStmt *stmt);
|
||||
extern Oid AlterRoleSet(AlterRoleSetStmt *stmt);
|
||||
extern void DropRole(DropRoleStmt *stmt);
|
||||
|
||||
Reference in New Issue
Block a user