Skip to main content

How does Vertica generate columns such as all_roles ?

  • October 1, 2014
  • 5 replies
  • 14 views

norbert_krupa
Forum|alt.badge.img+2
Looking at the underlying definition for v_catalog.users, there are a few columns such as all_roles, default_roles, and search_path which generate a concatenated list of their respective data.

I was unable to find these columns in vs_columns which leads me to the question of how are these columns generated since there's no native group concatenation functionality?

I'm aware of Concatenate.cpp.

5 replies

Curtis_1
Forum|alt.badge.img
  • Participating Frequently
  • October 4, 2014
v_catalog tables are built from the catalog itself. So, those fields are being combined from the catalog, not from other tables.

norbert_krupa
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • October 4, 2014
Dare I ask how, and how can this functionality be extended to work like a GROUP_CONCAT() function?

Curtis_1
Forum|alt.badge.img
  • Participating Frequently
  • October 4, 2014

I assume it's done via code internally.

You don't need group_concat to do pivoting, at least given a finite set of pivots, one could just do self-table joins. Though, that's not necessarily ideal, obviously.


eli_revach
Forum|alt.badge.img+2
  • Participating Frequently
  • October 7, 2014
Hi ,
Both of the columns come from v_internal.vs_users.

norbert_krupa
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • October 24, 2014
That's not really helpful. My question is around the functionality to build the list.