Skip to main content
Question

Full list of Warning/Error messages

  • January 8, 2019
  • 2 replies
  • 7 views

mkheir
Forum|alt.badge.img+1
  • Participating Frequently

Hello Experts,

Is there a table in Vertica that provide the full list of Warning/Error messages codes associated with each sql state.

Example : https://www.vertica.com/docs/9.1.x/HTML/index.htm#Authoring/ErrorCodes/SqlState-01000.htm

Many thanks.

2 replies

Jim_Knicely
Forum|alt.badge.img+2
  • Participating Frequently
  • January 9, 2019

I do not think there is currently a system table that contains the error messages, although that sounds like a good idea!

I created my own. Feel free to copy it.

CREATE TABLE public.sql_state_message
(
    class VARCHAR(50) NOT NULL,
    state VARCHAR(5) NOT NULL,
    description VARCHAR(100),
    message_type VARCHAR(10),
    message_number INT,
    message VARCHAR(500)
) ORDER BY class, state
  UNSEGMENTED ALL NODES;

I attached the data (From 9.2) and you should be able to load it like this:

COPY public.sql_state_message FROM '/home/dbadmin/sql_state_message.txt' TRAILING NULLCOLS DIRECT;

mkheir
Forum|alt.badge.img+1
  • Author
  • Participating Frequently
  • January 10, 2019

Perfect!! Many thanks Jim for this, very helpful.

In my situation I have vertica 9.1.0-2 and wish I can generate the same list (or check if different).