Page 1 of 1

Constraint type "Values that are generated by the database"???

Posted: Tue Mar 10, 2015 11:28 pm
by becky
Me again :)

I have another question about constraints. The Admin Guide mentions a constraint type "Values that are generated by the database". What is that?

Here is the link:

http://my.vertica.com/docs/7.1.x/HTML/i ... nts|_____0

Another thing, the same page says "Some examples of constraints are:" and then lists the constraints. If this is only "some" of them, what are the other ones? Are they undocumented?

Re: Constraint type "Values that are generated by the database"???

Posted: Wed Mar 11, 2015 1:59 am
by NorbertKrupa
becky wrote:Me again :)

I have another question about constraints. The Admin Guide mentions a constraint type "Values that are generated by the database". What is that?

Here is the link:

http://my.vertica.com/docs/7.1.x/HTML/i ... nts|_____0

Another thing, the same page says "Some examples of constraints are:" and then lists the constraints. If this is only "some" of them, what are the other ones? Are they undocumented?
I think it's referencing identity/sequences. Take a look at the column constraints. Vertica doesn't support CHECK constraints.

Re: Constraint type "Values that are generated by the database"???

Posted: Wed Mar 11, 2015 1:31 pm
by JimKnicely
There is the "Determines" constraint:

http://www.vertica-forums.com/viewtopic ... 869&p=6193

For fun, here are some older topics on how to fake a "Check" constraints in Vertica 8-) But, I wouldn't recommend implementing any of these in a production system...

http://www.vertica-forums.com/viewtopic.php?f=67&t=1091
http://www.vertica-forums.com/viewtopic.php?f=48&t=920
http://www.vertica-forums.com/viewtopic.php?f=48&t=336

Re: Constraint type "Values that are generated by the database"???

Posted: Wed Mar 11, 2015 6:25 pm
by becky
Again, thanks norbertk and Jim! Great great info. :!: