-
Notifications
You must be signed in to change notification settings - Fork 160
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
NULL constraint violation #71
Comments
You have not null constraint on column location -- location VARCHAR(70) NOT NULL REFERENCES locations ON -- UPDATE CASCADE, And your inner query returns nulls which you try to insert into location postgres=# SELECT On Fri, Oct 30, 2015 at 2:28 AM, Dane notifications@github.com wrote:
Ibrar Ahmed |
Hello,
I have some SQL that's failing because of a SELECT list sub-query. The bug is that when the sub-query is run on the local MySQL server it runs fine but when used as part of a larger query in the FDW it fails w/ a NULL constraint violation error.
I've put together a test case for you. It has been written against MySQL 5.6.27 and PostgreSQL 9.5beta1. The top part is the MySQL SQL. You should be able to just copy/paste into a MySQL client/terminal. The second half is PostgreSQL. You'll need to modify the OPTIONs clauses to point to your MySQL instance and username/password. After that you should be able to run it by copy/pasting into psql.
The text was updated successfully, but these errors were encountered: