This project is archived and is in readonly mode.

#3899 ✓stale

[PATCH] PostgreSQL CAST Problem on Defaultvalues

Reported by Traxanos | February 8th, 2010 @ 11:46 AM


i have a problem with PostgreSQL. PostgreSQL can cast default values and AR read the default string with cast into schema.rb.


CREATE TABLE soeintest
( test character varying NOT NULL DEFAULT '456' );

on db:

CREATE TABLE soeintest
( test character varying NOT NULL DEFAULT '456'::character varying );

in schema:

t.string "test", :default => "'456'::character varying", :null => false

I have fix this Problem by change the SQL that read the data.

Comments and changes to this ticket

  • Rohit Arondekar

    Rohit Arondekar October 9th, 2010 @ 03:13 AM

    • State changed from “new” to “stale”
    • Importance changed from “” to “Low”

    Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.

  • Andrea Campi

    Andrea Campi October 11th, 2010 @ 07:21 AM

    • Tag changed from activerecord, fix, patch, patched, postgres, postgresql, schema to activerecord, fix, patch, postgres, postgresql, schema

    bulk tags cleanup

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>