mirror of
https://github.com/postgres/postgres.git
synced 2025-07-31 22:04:40 +03:00
Print out error position for some more DDLs
The following commands gain some information about the error position in the query, should they fail when looking at the type used: - CREATE TYPE (LIKE) - CREATE TABLE OF Both are related to typenameType() where the type name lookup is done. These calls gain the ParseState that already exists in these paths. Author: Kirill Reshke, Jian He Reviewed-by: Álvaro Herrera, Michael Paquier Discussion: https://postgr.es/m/CALdSSPhqfvKbDwqJaY=yEePi_aq61GmMpW88i6ZH7CMG_2Z4Cg@mail.gmail.com
This commit is contained in:
@ -1615,7 +1615,7 @@ transformOfType(CreateStmtContext *cxt, TypeName *ofTypename)
|
||||
|
||||
Assert(ofTypename);
|
||||
|
||||
tuple = typenameType(NULL, ofTypename, NULL);
|
||||
tuple = typenameType(cxt->pstate, ofTypename, NULL);
|
||||
check_of_type(tuple);
|
||||
ofTypeId = ((Form_pg_type) GETSTRUCT(tuple))->oid;
|
||||
ofTypename->typeOid = ofTypeId; /* cached for later */
|
||||
|
Reference in New Issue
Block a user