From: | jian he <jian(dot)universality(at)gmail(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kirill Reshke <reshkekirill(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Pass ParseState as down to utility functions. |
Date: | 2024-12-12 04:38:06 |
Message-ID: | CACJufxGJfQLE4uSm_reStynyD8hFG2o+pJdp0WywUfRQ4eGxPg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 12, 2024 at 10:29 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
>
> I think that the patch should be split a bit more. Even if different
> areas of the code are touched, there's more than one idea of how to
> create this information for the error position, so each piece could be
> committed separately with changes showing up as diffs in the
> regression tests.
> --
I've split it into two patches, one for CREATE DOMAIN only. one for
another DDL command.
0001:
I am using DefineDomain(ParseState *pstate, CreateDomainStmt *stmt) for now.
we can also pass querystring or another struct.
0002:
passing AlterTableUtilityContext for some ALTER TABLE subroutine.
add parser_errposition to some existing `ereport(ERROR` places.
-------------------
you mentioned ALTER DOMAIN, I have further simplified it at
https://postgr.es/m/CACJufxG0N_WLfk-NC_k5w6vv26qLvXupbHvnkKtc2npftJQicQ@mail.gmail.com
create domain d_fail as int constraint cc REFERENCES this_table_not_exists(i);
like this command will fail, so we don't need to change
create_domain.sgml synopsis section
?
Attachment | Content-Type | Size |
---|---|---|
v11-0002-print-out-the-error-position-for-some-DDL-comman.patch | text/x-patch | 19.2 KB |
v11-0001-Print-out-error-position-for-CreateDomainStmt.patch | text/x-patch | 14.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2024-12-12 04:48:35 | Re: COPY performance on Windows |
Previous Message | Bertrand Drouvot | 2024-12-12 04:36:21 | Re: Track the amount of time waiting due to cost_delay |