Re: [HACKERS] Weird behavior during CREATE EXTENSION

2016-01-13 Thread Tom Lane
Jim Nasby writes: > On 1/12/16 5:00 PM, Tom Lane wrote: >> Also, there's some technology in CREATE FUNCTION that deals with the fact >> that we may be calling the parser on a string different from the original >> user command, which might be worth borrowing here --- at least part of >> the confusi

Re: [HACKERS] Weird behavior during CREATE EXTENSION

2016-01-13 Thread Jim Nasby
On 1/12/16 5:00 PM, Tom Lane wrote: There's certainly room to improve error reporting for extension scripts, but I think you are heading into a dead end in the name of saving a little time coding. I'd suggest looking into an errcontext callback, instead. Also, there's some technology in CREATE

Re: [HACKERS] Weird behavior during CREATE EXTENSION

2016-01-12 Thread Tom Lane
Jim Nasby writes: > I can think of 4 ways to fix this: > 1) Have psql parse the script into separate commands for us. > 2) Pull enough of psql's parsing into the backend code to be able to do #1 > 3) Add *file* line numbers to the output of pg_parse_query() > 4) Have ereport spit out the context

[HACKERS] Weird behavior during CREATE EXTENSION

2016-01-12 Thread Jim Nasby
This behavior had be quite baffled... ~@decina.local/29760# create extension "trunklet-format" CASCADE; NOTICE: installing required extension "trunklet" NOTICE: installing required extension "variant" CREATE EXTENSION ~@decina.local/29760# create extension "pgxntool-test"; ERROR: syntax error