Niels Breet postgres
Fri Apr 15 16:43:59 PDT 2005
> In view of the recent changes to handling of quoting, I have added in
> a new "ducttape" script, test_A_namequoting, which replicates the following
> tables:
>
>
> create schema "Schema.name"; create table "Schema.name"."user" ( id
> integer, "user" text not null unique,
> primary key (id) );
>
>
> create table "Schema.name"."Capital Idea" ( "user" text,
> description text, primary key("user") );
>
>
> create table public.evil_index_table ( id integer not null, name text not
> null, "eViL StudlyCaps.column" text
> );
> create unique index "user" on public.evil_index_table(id);
>
> The slonik used to handle it is thus:
>
>
> include <$PREAMBLE_FILE>; try { create set (id = 1, origin = @origin,
> comment = 'Set 1 - funky tables'); set add table (set id = 1, origin =
> @origin,
> id = 1, fully qualified name = 'public.evil_index_table', key = 'user',
> comment = 'Table with evil index name'); set add table (set id = 1, origin
> = @origin,
> id = 2, fully qualified name = '"Schema.name".user', comment = 'Table with
> evil name - user, and a field called user'); set add table (set id = 1,
> origin = @origin, id = 3, fully qualified name = '"Schema.name"."Capital
> Idea"',
> comment = 'Table with spaces in its name, caps, and a user field as PK'); }
> on error { exit 1; }
>
>
> If there are other reserved names or interesting quoting combinations
> that you think I should try out, please let me know. --

Try this also:

create table "test.23" (
"table" int unique
);

As this creates a unique index with a dot in the name :)




More information about the Slony1-general mailing list