Re: changeset generation v5-01 - Patches & git tree

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: changeset generation v5-01 - Patches & git tree
Дата
Msg-id 20130705160400.GA20369@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: changeset generation v5-01 - Patches & git tree  (Steve Singer <steve@ssinger.info>)
Список pgsql-hackers
On 2013-07-05 11:33:20 -0400, Steve Singer wrote:
> On 06/14/2013 06:51 PM, Andres Freund wrote:
> >The git tree is at:
> >git://git.postgresql.org/git/users/andresfreund/postgres.git branch xlog-decoding-rebasing-cf4
>
>http://git.postgresql.org/gitweb/?p=users/andresfreund/postgres.git;a=shortlog;h=refs/heads/xlog-decoding-rebasing-cf4
> 
> 
> We discussed issues related to passing options to the plugins a number of
> months ago ( http://www.postgresql.org/message-id/20130129015732.GA24238@awork2.anarazel.de)
> 
> I'm still having issues with the syntax you describe there.
> 
> 
> START_LOGICAL_REPLICATION "1" 0/0 ("foo","bar")
>  unexpected termination of replication stream: ERROR:  foo requires a
> parameter

I'd guess that's coming from your output plugin? You're using
defGetString() on DefElem without a value?

> START_LOGICAL_REPLICATION "1" 0/0 ("foo" "bar")

Yes, the option *names* are identifiers, together with plugin & slot
names. The passed values need to be SCONSTs atm
(src/backend/replication/repl_gram.y):

plugin_opt_elem:        IDENT plugin_opt_arg            {                $$ = makeDefElem($1, $2);            }    ;

plugin_opt_arg:        SCONST                            { $$ = (Node *) makeString($1); }        | /* EMPTY */
          { $$ = NULL; }    ;
 

So, it would have to be:
START_LOGICAL_REPLICATION "1" 0/0 ("foo" 'bar blub frob', "sup" 'star', "noarg")

Now that's not completely obvious, I admit :/. Better suggestions?

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: strange IS NULL behaviour
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] Add transforms feature