From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | jian he <jian(dot)universality(at)gmail(dot)com> |
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-16 06:15:27 |
Message-ID: | Z1_Ff9zHQxFzEiJw@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 12, 2024 at 12:38:06PM +0800, jian he wrote:
> I am using DefineDomain(ParseState *pstate, CreateDomainStmt *stmt) for now.
> we can also pass querystring or another struct.
All the changes in the alternate outputs for collate are always tricky
to track. As far as I can see, you've not missed a spot. So applied
this one.
> 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
- likeType = typenameType(NULL, defGetTypeName(likeTypeEl), NULL);
+ likeType = typenameType(pstate, defGetTypeName(likeTypeEl), NULL);
The only test impacted by this change is the CREATE TYPE (LIKE) in
float8. It seems like this should be separated as a change of its own
as it impacts its own command.
For the rest, we're just manipulating ATExecAddOf(),
ATPrepAlterColumnType() and ATExecAlterColumnType(). FWIW, I'm
feeling annoyed with these new make_parsestate() calls, also knowing
that we do it twice for the prep and exec parts of AlterColumnType.
Perhaps that's fine at the end, that's just an increase of calls to
make_parsestate(), still...
> like this command will fail, so we don't need to change
> create_domain.sgml synopsis section?
Yep, right. I was getting the impression that it would be possible to
have these ones go through with the parser allowed them when I looked
at that last Thursday. Will double-check to be sure.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2024-12-16 06:37:47 | Re: Proposal for Updating CRC32C with AVX-512 Algorithm. |
Previous Message | Amit Kapila | 2024-12-16 05:57:34 | Re: Added schema level support for publication. |