[Bucardo-general] table name case sensitivity

Mitchell Perilstein Mitchell.Perilstein at trueposition.com
Thu Feb 21 15:45:09 UTC 2013

This is a very minor issue but I wanted to save someone the trouble.  It 
might bear fixing at low prio.  (4.99.6)   I think it's in add_table() 
as well as add_herd().

My database downcases any table names you give it when reporting them 
back.  (Other DB's upcase them by the way!)
This can lead to issues if you don't give Bucardo names in the same case 
as reported.   Eg, make a table:

    # psql -Upostgres -d mydb -c 'create table FooBar ( myid smallint,
    myval smallint )'

    # psql -Upostgres -d mydb -c '\d' | grep -i foobar
        public | foobar                 | table | postgres

Tell bucardo using the same name, fails:

    # bucardo add table FooBar  db=source_blah herd=blahherd
      |DEBUG| Searched live database "source_blah" for arg "FooBar",
    count was 0
    Did not find matches for the following terms:

It works if you give the same case your DB reports:

    # bucardo add table foobar  db=source_blah herd=blahherd
      |DEBUG| Searched live database "source_blah" for arg "foobar",
    count was 1
      |DEBUG| Added "public.foobar" with db "source_blah", count was 1
    Added the following tables:
    The following tables are now part of the relgroup "blahherd":

Confidentiality Notice: This e-mail (including any attachments) is intended only for the recipients named above. It may contain confidential or privileged information and should not be read, copied or otherwise used by any other person. If you are not a named recipient, please notify the sender of that fact and delete the e-mail from your system.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.endcrypt.com/pipermail/bucardo-general/attachments/20130221/16f60613/attachment.html>

More information about the Bucardo-general mailing list