-
Notifications
You must be signed in to change notification settings - Fork 834
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
Support the PostgreSQL engine on Windows #282
Comments
Can you specify the error message? |
I am getting below error.
|
Ah, the dreaded "missing C header files" error. First, this seems like a problem within pg_query_go and the C header files available on your system. I have two recommendations for you:
I will research a little bit more in order to see if there is some other options, but those two are the ones that were on the top of my mind. |
@kyleconroy @euller88 how about providing a binary file on every releases? user can download directly? |
@landbed that is already the case. You can download macOS and Linux binaries for every commit on master. Each release also has binaries. The issue is that out PostgreSQL parser does not support Windows. Once MySQL support is complete, we'll offer a Windows version that does not support PostgreSQL. |
Hi @kyleconroy, windows binaries then will not be useful for people using postgresql. |
Just FYI, you can run |
Initial Windows support is now live (#886). GOOS=windows GOARCH=amd64 go build ./cmd/sqlc/ These builds have a huge limitation: the PostgreSQL engine does not work. While that's obviously not ideal, it's good for those people that only need MySQL support. |
|
Hello any updates regarding this issue? is there a possibility for postgresql support in windows soon? |
Fortunately it is working. There is a little hack for the lack of systemd in WSL2, but it is surmountable via commands mentioned here: microsoft/WSL#5126 (comment) |
I ended up installing sqlc with homebrew on WSL |
I'm sorry for being rude but how is this 3 years in and still not fixed?! I've just started migrating a new project from GORM and this is honestly unacceptable. The WSL workaround is not enough, I think the parser should have native Windows support. |
@NinoM4ster the parser is a different project that is not maintained by Kyle. You can always open an issue on the pg_query_go repository. Also, any contributions towards a parser that works on Windows would be greatly appreciated. |
This issue seems to track that already. Thanks. |
Oh wow, tried the WSL workaround, but still didnt work, damn |
Gives:
Possible solution in windows (worked for me):
|
please, can you explain step by step how it worked for you on Windows? |
I just ran into this issue as well first use https://docs.sqlc.dev/en/latest/overview/install.html#docker |
Just run that command exactly as it is... do not change anything |
install sqlc through go install in wsl then try this: |
There is an option to use Otherwise the best solution seems to be using a downloaded release binary with WSL. I am closing this issue since |
version: "2"
I keep getting this error |
@Ali-Adel-Nour Your config structure looks like version "1" but you've specified version "2". Your config should parse if you set |
I decided to use the wsl workaround but it didn't see my database. I've installed postgres on wsl but there's no way to access it on pgadmin. |
Hi, I just started exploring this project. But not able to build the project on windows. Is windows support in the road map. Thanks
The text was updated successfully, but these errors were encountered: