Re: [HACKERS] "SQL sentence"?

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] "SQL sentence"?
Дата
Msg-id 20170218044654.uxqwiffpegn7ovcg@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] "SQL sentence"?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Ответы Re: [HACKERS] "SQL sentence"?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: [HACKERS] "SQL sentence"?  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: [HACKERS] pg_get_object_address() doesn't support composites
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [HACKERS] "SQL sentence"?