Plugins being forced to use Uppercase Tablenames is causing conflicts between Postgres & Microsoft Query/Excel

All Atlassian plugins appear to be forced to adopt uppercase names for their schema. Plugin tables appear to be generally prefixed with AO_<unique plugin code>_<plugin's table>, always in upper case. In a PostgreSQL 9.3.3 installation, when data tries to be extracted from these tables using Microsoft Query, I get "relation does not exist". This is because Microsoft Query forces the query to lower case, and Postgres is case sensitive.

EG. "SELECT * FROM public.AO_21D670_WHITELIST_RULES" gives this error:

ERROR: relation "public.ao_21d670_whitelist_rules" does not exist; Error while executing the query.

This is common to both Jira & Confluence and is likely a Marketplace-wide issue.

The general way this is fixed is by changing all the tables and columns in the Postgres database to lower case but I don't think that's an option for an Atlassian installation?

Can anyone suggest a way to get Microsoft Query working here? Is there some setting I can change in Postgres to make it case insenstive?

1 answer

1 accepted

If I remember correctly (about 15 years ago), have you tried putting the table name inside double quotes? I don't remember if the tablename parts can be individually quoted or the whole string needs to be quoted.

SELECT * FROM public."AO_21D670_WHITELIST_RULES"

They might have changed their standard to use [] characters instead like MSSQL.

I did a packet capture and Microsoft Query strips the quotes if it can parse it. This causes Postgres to also cause the query to fail.

I had to put "LIMIT ALL" after the query for it to work. So the final query looks like this:

SELECT * FROM public."AO_21D670_WHITELIST_RULES" LIMIT ALL

Thanks though, it got me on the right track!

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

198 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you