markdrago / pgsanity

Check syntax of postgresql sql files
MIT License
316 stars 28 forks source link

Any plans to have support of the Redshift syntax? #21

Closed unicast closed 7 years ago

unicast commented 7 years ago

Any way I can contribute?

markdrago commented 7 years ago

So, the way pgsanity works it isn't actually doing any of the validation itself. It's leveraging ecpg which comes with postgresql. As far as I know there isn't a great way to add redshift support to pgsanity for exactly this reason; ecpg doesn't know about redshift. Is the syntax really that different? I guess it doesn't matter how different it is; if it's different at all you'll get a lot of false positives from pgsanity.

unicast commented 7 years ago

Ah, ok, got it. Actually it turns out the main difference is about DDL, e.g. encode for columns http://docs.aws.amazon.com/redshift/latest/dg/t_Compressing_data_on_disk.html and system calls like vacuum delete, the rest looks fine, thank you!