I use https://console.bluemix.net/docs/services/ComposeForPostgreSQL/index.html#about-compose-for-postgresql

And for some select with long column alias ex:

select id as "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
from tableName

I receive the following message:

NOTICE:  identifier "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" will be truncated to "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

Successfully run. Total query runtime: 166 msec.

Where can I find all these messages?

PS I use sequelize and I met this problem https://github.com/sequelize/sequelize/issues/2084 after migration from MySQL.

And I want to monitor if there are no selects in the application with such issue.

  • I know this isn't the answer to your direct question, but the solution is to not use aliases that are longer than 63 bytes. It's quite possible that this could be promoted to an error in a future version – Philᵀᴹ Apr 19 '19 at 10:39
  • Hello @Philᵀᴹ, I edit the question with more info. – Darii Petru Apr 19 '19 at 11:15

You can change log_min_messages to notice which will then write all notices to the server's log file.

Note that a client can overwrite that setting any time, so it's not 100% reliable.

| improve this answer | |
  • Hello @a-horse-with-no-name , Thanks for the answer, I tried your solution but I have no rights :( – Darii Petru Apr 23 '19 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.