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

Add support for PostgreSQL 9.2+'s native json type. #32

Merged
merged 1 commit into from
Mar 22, 2013

Conversation

fletom
Copy link
Contributor

@fletom fletom commented Feb 15, 2013

The patch keeps things portable by still returning 'text' for unsupported databases/versions.

@bradjasper
Copy link
Collaborator

@fletom I'm not very familiar with the PostgreSQL's native JSON type––do you know what effect this would have for people already using a regular text field? How would the migration work?

@fletom
Copy link
Contributor Author

fletom commented Feb 21, 2013

It should only make a difference when you're creating the field for the first time. The json and text types are functionally almost identical so for existing fields it should continue to function just fine.

@bradjasper
Copy link
Collaborator

@fletom Since this is a backwards incompatible change I'm going to save this for the 1.0 release. This should be coming up in the next few weeks.

@fletom
Copy link
Contributor Author

fletom commented Mar 11, 2013

As I said I think it is actually backwards compatible. Existing fields will continue to work just fine. New fields will just use the json type instead of text, which is fine since they're compatible field type. But go ahead and wait for 1.0 if you still want to.

@bradjasper
Copy link
Collaborator

Hey @fletom, sorry I must have misunderstood what you were saying.

I'd like to check this for sure––I've got some time tomorrow when I can look into this. If everything looks good, I'll get this merged.

@bradjasper
Copy link
Collaborator

@fletom as I was looking into this today I realized this would potentially collide with another issue we're having (#33)

Basically storing JSON in a string is giving us problems, so we're considering options like prepending "json:" to the string (which wouldn't work with a native JSON field).

We're looking for better solutions, but as of right now this is the only proposal we have. Once we get this issue resolved, I'll jump back on this and see if we can get it merged in.

This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants