Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of documentation #3

Open
CodingFeles opened this issue May 6, 2015 · 2 comments
Open

Lack of documentation #3

CodingFeles opened this issue May 6, 2015 · 2 comments

Comments

@CodingFeles
Copy link

Hello.
I'm sorry, maybe it's not a functional issue, but it causes some trouble with using your type.
Could you please make step-by-step quickstart guide?
With emphasis on what is default variant, how to register non-default variant and allow storage for that.
Maybe simple use cases (insert, update, select with where clause, using different value types for same record, etc.).
That would be great.

@CodingFeles
Copy link
Author

I've figured out how to register variant and now I see that documentation covers it(partially, regtypes and storage allowed not covered), but to be more clear it could be rephrased and converted to step-by-step. Now it's default variant used for examples, though latter it was changed, I think it would be better to register new variant and show examples with it.

@decibel
Copy link

decibel commented May 6, 2015

Yeah, I need to redo some of the docs. The latest version fundamentally changes how some of these things work. In particular, if a variant doesn't allow storage and you don't specify any allowed types, it will allow ALL types. That's how the DEFAULT variant is setup now, and it's also enabled by default.

BTW, the reason for all these games is to protect from someone doing

CREATE TABLE v(v variant);
INSERT INTO v VALUES( ...::my_custom_type );
DROP TYPE my_customer_type;

which would result in no longer being able to retrieve the value stored in the table, even if you re-installed my_custom_type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants