Convert PostgreSQL script to Vertica

Moderator: NorbertKrupa

Post Reply
jsabz29
Newbie
Newbie
Posts: 2
Joined: Tue Sep 04, 2018 8:11 am

Convert PostgreSQL script to Vertica

Post by jsabz29 » Tue Sep 04, 2018 8:13 am

Can you help me convert the below postgreSQL DDL to Vertica DDL? Having a hard time to interpret index, COLLATE pg_catalog."default", and other stuffs setting aside the basic codes (create, alter, datatypes).

CREATE TABLE dev.ir_transaction_summary
(
ns_period character varying(10) COLLATE pg_catalog."default",
source_system character varying(4) COLLATE pg_catalog."default",
transaction_type character varying(50) COLLATE pg_catalog."default",
external_id character varying(100) COLLATE pg_catalog."default",
transaction_date date,
record_count integer,
total_amount numeric,
moneyback_credit numeric,
fs_credit numeric,
currency character varying(3) COLLATE pg_catalog."default"
)
WITH (
OIDS = TRUE
)
TABLESPACE pg_default;

ALTER TABLE dev.ir_transaction_summary OWNER to fin_adm;

CREATE INDEX ir_tran_sum_date_n1
ON dev.ir_transaction_summary USING btree
(transaction_date)
TABLESPACE pg_default;

CREATE INDEX ir_tran_sum_extid_n5
ON dev.ir_transaction_summary USING btree
(external_id COLLATE pg_catalog."default")
TABLESPACE pg_default;

CREATE INDEX ir_tran_sum_period_n2
ON dev.ir_transaction_summary USING btree
(ns_period COLLATE pg_catalog."default")
TABLESPACE pg_default;

CREATE INDEX ir_tran_sum_system_n3
ON dev.ir_transaction_summary USING btree
(source_system COLLATE pg_catalog."default")
TABLESPACE pg_default;



Let me know if you have any concerns.

Thank you very much for your kind assistance.

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1824
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Convert PostgreSQL script to Vertica

Post by JimKnicely » Wed Sep 05, 2018 1:04 pm

Hi,

Please follow the thread here per this topic!

https://forum.vertica.com/discussion/23 ... ica#latest

Thanks!
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

jsabz29
Newbie
Newbie
Posts: 2
Joined: Tue Sep 04, 2018 8:11 am

Re: Convert PostgreSQL script to Vertica

Post by jsabz29 » Thu Sep 06, 2018 7:17 am

Thanks Jim, I thought this was different forum. As I'm looking for a quick response, but you already provided me a good one. Appreciate it! Thank you. Have a great day! :)

Post Reply

Return to “Vertica SQL”