Skip to main content

User defined types

  • December 6, 2017
  • 4 replies
  • 7 views

chaima
Forum|alt.badge.img+2
  • Participating Frequently

Hi,

Are user defined types supported in Vertica? I can't find anything re this in the documentation, but the following would create a new type (although useless)
CREATE TYPE test_type (x=varchar);

Thanks

4 replies

marcothesane
Forum|alt.badge.img+1
  • Participating Frequently
  • December 6, 2017

I checked the docu just now.
There's nothing in "SQL Statements" between CREATE TEXT INDEX and CREATE USER.
So even if it should be hidden somewhere in the functionality, it would surely not be supported, I think ...
Cheers
Marco


Dingqiang
Forum|alt.badge.img+1
  • Participating Frequently
  • December 6, 2017
It’s used by geometry types of Vertica Place, I guess.

Ariel_Cary
Forum|alt.badge.img
  • Participating Frequently
  • December 6, 2017

Hi chaima,

User-defined types are not supported. We have limited functionality to create alias-like types which is used by Place at the moment.

Could you share more details about your use case? That will help us shape the development of this feature in next releases.

Ariel


chaima
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • December 6, 2017

Thank you all,
This was requested by a customer. They're used to creating user defined data types like in SQL server. example:
create type mytype from char(10);
create table maTable1 (IDT_PRD int, DATD_PRD mytype);

Regards
Chaima