Jan Wieck JanWieck at Yahoo.com
Thu Aug 30 09:01:29 PDT 2007
On 8/29/2007 2:52 PM, Dmitry Koterov wrote:
> And much worse - seems such DDL with comments breaks the whole 
> replication (fortunately I have run it on a test server, not in production).
> I watched sl_event table on a subscriber and noticed that the whole DDL 
> (with comments included) are passed and saved in the subscriber.

Where in the ANSI SQL standard does it allow -- comments nested inside 
of /* ... */ comments?

Just because Postgres itself allows it doesn't mean that every piece of 
software working with Postgres must be aware of this, does it?


Jan

> 
> 
> On 8/29/07, *Dmitry Koterov* <dmitry at koterov.ru 
> <mailto:dmitry at koterov.ru>> wrote:
> 
>     Hello.
> 
>     I feed the followind DDL SQL code to slonik:
> 
>     ==============================================
>     -- Execute all schema changes.
>     SET statement_timeout TO 0;
> 
>     /*
>     select count(distinct person_id)
>     from
>         person
>         join dictionary on dic_category_id=11
>         left join person_settings on ps_person_id=person_id and
>     ps_did=dic_id
>     where
>         ps_person_id is null
>     -- only 9000!
>     */
> 
>     CREATE SEQUENCE "public"."obj_setting_os_id_seq"
>         INCREMENT 1  MINVALUE 1
>         MAXVALUE 9223372036854775807  START 1
>         CACHE 1;
>     ==============================================
> 
>     But I see that ALL DDL code below the comment is removed, not only
>     the comment:
> 
>     DDL Statement 0: (0,99) [
>                         -- Execute all schema changes.
>                         SET statement_timeout TO 0;]
>     Submit DDL Event to subscribers...
>     DDL on origin - PGRES_TUPLES_OK
> 
>     Seems slonik & others parser parses SQL code incorrectly - skips
>     everything after a multi-line comment.
>     Please fix this in a new version...
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Slony1-general mailing list
> Slony1-general at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-general


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list