From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: "SQL sentence"? |
Date: | 2017-02-18 04:46:54 |
Message-ID: | 20170218044654.uxqwiffpegn7ovcg@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jim Nasby wrote:
> On 2/17/17 10:19 PM, Alvaro Herrera wrote:
> > > (FWIW, I'm wondering because I was just looking to see why there's no
> > > details for things like altering a column in a table.)
> > Do you mean you want to have access to the details of the alter table
> > operations being executed? There's no structured data for that; you
> > need to write a C function to examine the pg_ddl_command opaque column.
>
> Yeah. It doesn't seem unreasonable for a user to want to get at that info.
Sure. We have the extension that turned the command into JSON. It's
still an unfinished patch, sadly, even though Alex Shulgin spent a lot
of effort trying to get it finished. It is still missing a nontrivial
amount of work, but within reach ISTM.
> Could the opaque column be mapped to a composite?
No. If it could, we would just have added the fields to the output of
the function.
> I guess that'd be a bit of
> a pain due to the union. :/ And I have a suspicion that alterTable.subcmds
> is a list of CollectedCommand, making things more fun.
The AT subcmds have their own struct, so it's even more fun than that.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2017-02-18 06:18:20 | Re: "SQL sentence"? |
Previous Message | Jim Nasby | 2017-02-18 04:36:30 | Re: pg_get_object_address() doesn't support composites |