-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Postgresql #1666
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
Postgresql #1666
Conversation
👍 |
Yeah! I like this solution |
I now clean code. |
doc/installation.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sqllite
but sqlite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed. Sorry
merged :) |
@randx, thx, или по-русски говоря - большое, человеческое спасибо :) |
@zzet :) или по русски "улыбочка" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
INOUT - TYPO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, INOUT
is correct (cf. docs):
Parameters
WITH INOUT
Indicates that the cast is an I/O conversion cast, performed by invoking the output function of the source data type, and passing the resulting string to the input function of the target data type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vsizov this solution not good, but it is better, what we can do at this moment.
INOUT - correct, but needed with super user. For many other solutions - it's awful, but it is normal for Gitlab as the decision itself - the product and the infrastructure is controlled by administrators.
@dmke thanks for answer
These are basically the same fixes proposed in #554 which were rejected as “hacks”… There’s still the same issue with the CAST of integer – you need admin rights in PostgreSQL (user “postgres” by default) to do that and it’s not propagated (and can not be) to schema.rb so you have to run migrations to apply it ( There’s still the issue with wiki pages I’ve described in #1489 which you didn’t respond to. You also should know that this functionality is not covered by tests, that’s why it seems to be ok now… I’m also very unhappy with your final answer to #554 – this is not about “hacking” GitLab to work on PostgreSQL but fixing it to work on any proper SQL database! It’s simply broken and it works on MySQL and SQLite just because it violates SQL standard. However, this is mainly ARel’s fault, not GitLab’s. Sorry, this kinda raised my blood pressure this morning. |
As @jirutka said:
Do you know, what one developer make PR to Rails with fix this bug? I'm control this moment. As @jirutka said:
Administrator rights are not required to do so, if you implement a function for conversion. As @jirutka said:
Bad solution... Zero migration may be, but not run migration. As @jirutka said:
I think, that some messages not to public publications As @jirutka said:
This is the best solution that can be used at this time. What about other databases - what exactly are you talking about? Or are you just the way you wrote? Let's be objective. This pull solves the problem of compatibility for Postgres and destroys what was now. Our team understands that this is not the best solution of those that can be and we do Research, on this issue, as you can support 3 of DBMSs such hacks. AR will patch up until not fix a bug in the rails that on CAST - it is a disgusting decision, I was disgusted by it, but what do you suggest? For the future - in Russia there is a saying. "Criticize - offer. Suggest - do." When we needed support Postgres - we had a discussion with a dense Gitlab developers on the issue and found a common ground. You tried to understand them and understand what they do not like? thx |
So the cast migration didn't work for me but logging in with
can then running that cast did |
@williscool you read #1666 (comment) tred? currently required to use Postgres superuser |
Yeah I did see that. Don't know that I knew exactly what it meant though. But I'm debating in my head whether it would be better to not have that migration and just tell people to log into the console and do it. I say this because I think the migrations are rolling back because this fails. And it would be easier to make sure that doesn't happens and then do the type cast yourself as that user. Kind of like a final Warning: postgres support is experimental at this point But of course:
|
What about this solution?
That's all.