-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Value too long varchar(275) error with src/AdminViews/v_generate_tbl_ddl.sql #38
Comments
Have you tried with other values ( like 1024 instead of 8000 ) ? |
8000 is semi-arbitrary. The size just has to be large enough to hold the text of a long FOREIGN KEY object name. 1024 would work until you had a DDL generation for a line needing 1025 characters.
|
Correct. Given the max size of objects( tables and columns ) 1024 should be enough. |
Pushed fix |
Looks like the problem isn't fixed. The fix should go on line 89 in the |
When running v_generate_tbl_ddl.sql on certain databases, the script errors with the message:
ERROR: value too long for type character varying(275)
When hacking at the script, I discovered that changing line 77 from this:
,'\t,' + pg_get_constraintdef(con.oid) AS ddl
to this:
,'\t,' + pg_get_constraintdef(con.oid)::VARCHAR(8000) AS ddl
addresses the problem for my use case. Unfortunately, I cannot speak to whether this would be the optimal way to solve this for all conditions due to the script's close ties with the deep inner workings of Redshift.
The text was updated successfully, but these errors were encountered: