
[patch] Postgres varchar length support
Reported by Mayo Jordanov | February 6th, 2008 @ 02:32 AM
Enable using :length option on Postgres varchars.
- Length can't be specified for integers
- If length for varchar is not specified, the length is unlimited, rather than the default 50.
- In any other case, nil is returned for size, as was the previous default.
I've also looked at removing to_long_form, however there are slight differences between postgres and the abstract adapters. The abstract adapter is written to always insert #{type_declaration}, regardless of column being or not being primary key. The postgres version excludes #{type_declaration} when the column is serial. This may have something to do with how the default serial/PK column is generated when one is not specified, but I'm not yet familiar with the code base enough to make the decision there.
Comments and changes to this ticket
-
Mayo Jordanov February 6th, 2008 @ 02:55 AM
- Title changed from [patch] Postgres support for length to [patch] Postgres varchar length support
-
Mayo Jordanov February 6th, 2008 @ 03:00 AM
Oops, seems like this is duplicate of #140 but with slightly different solution.
-
-
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »