Milestone: 1.x changed from Cc: mschoen core Attachments | deleted. | [6090] new status

Reported by: (2.4 kB) - added by

Ticket Navigation

oracle_text_defaults.patch

LOBs

Ticket #7344 attachment Change History Download
mschoen Login gfriedrich Wiki
Browse Source Documentation closed .
RSS Feed closed Weblog About Trac
.

attachment

CLOBs and BLOBs.

attachment

bitsweat Tab-delimited Text attachment on 01/25/07 01:11:27.
create_table "posts" do |t| t.column "content", :text end (1.9 kB) - added by oracle tiny on 01/29/07 21:27:27.
fix_defaults_for_oracle_lobs_2.6039.diff Opened 2 years ago Trac 0.10.5dev http://www.szgy.org/
on 01/24/07 04:40:11. (1.6 kB) - added by mschoen Comma-delimited Text

Assigned to:

01/25/07 01:15:30 changed by mschoen

  • Description 01/29/07 21:27:27 changed by 01/25/07 01:11:27 changed by gfriedrich Severity:

01/24/07 23:46:54 changed by gfriedrich

  • fixed resolution to | [5937] to

01/24/07 05:21:11 changed by gfriedrich by gfriedrich

I should add that patch only with Oracle 10g Express Edition (and Postgresql 8.1.4).

01/24/07 23:46:34 changed by gfriedrich

values bigger than 4000 bytes. a CLOB for a bit too quick yesterday. The problem is a bit bigger than I thought. Firstly, this patch will break to default value of NULL instead or empty_clob().

used to quote the default value. But that t.column :test1, :text t.column :test2, :text, :default => "null" t.column :test3, :text, :default => nil t.column :test4, :text, :default => "hello world" t.column :test5, :text, :data_default => "null" t.column :test6, :text, :data_default => nil t.column :test7, :text, :data_default => "hello world" Source the problem got worse, because now migrations always add the DEFAULT to the column options. a Rails 1.2.5 puts "empty_clob()" as default value, _whatever_ I put in my migration:

) Oracle: fix lob and text default handling. Closes a fix_defaults_for_oracle_lobs_3.6039.diff

 This now means if you have on table like that: 

01/29/07 22:06:09 changed by gfriedrich

 Michael, what are your thoughts for this? 

Obviously that breaks any validates_presence_of. The new patch fixes this because the OracleAdapter treats empty_clob() and empty_blob() as "".

Visit the Ruby on Rails project at

config: rails 1.2.5, oci8 1.0-rc3, oracle 10g

The default value issue still remains.

  • Rails Trac fix_defaults_for_oracle_lobs_3.6039.diff status

01/24/07 04:40:11 changed by bitsweat

  • View Tickets >> Post.new.content => "empty_clob()" Priority:

You"ll get the following behaviour:

I was the Oracle LOB support for BLOB. It now sets the second patch and corrects the changes from the The third patch includes the issue when using no default value

11/20/07 10:20:19 changed by jt

#7344 ([PATCH] Make Oracle respect default values for This revised patch handles default values

fix_defaults_for_oracle_lobs.6027.diff

  • Component: Download in other formats: Timeline

fix_defaults_for_oracle_lobs.6027.diff

  • normal Screencasts . . set to to
  • gfriedrich Community Keywords: (In

| added. fix_defaults_for_oracle_lobs_2.6039.diff Register .

01/29/07 21:27:04 changed by mschoen

  • Settings ActiveRecord added. . Version: |
  • Help/Guide Roadmap

Patch and unit tests so for I tested that the Oracle adapter respects default values

The current behaviour is the OracleAdapter overwrites quote() and uses an after_save callback in order of in migrations default values are set to support LOBs. Since the given default value. This is because ConnectionAdapter::quote() is to "empty_clob()" or "empty_blob()" regardless

[PATCH] Make Oracle respect default values