I like the idea of specifying it at the model level.  this way you can pick 
and choose.

On Monday, October 8, 2012 2:52:59 PM UTC-4, Abdelkader Boudih wrote:
>
>
>
> On Sunday, 7 October 2012 01:16:17 UTC+1, Robert wrote:
>>
>> By default with Rails, Postgres will return the id of a newly inserted 
>> record using returning "id". Sometimes when working with Postgres, 
>> tables will have triggers on them that modify the row's data while being 
>> saved. As such, it would be great to also provide an option for Postgres to 
>> also let insert/updates and deletes to use returning * (which will 
>> return the row as it looks after Postgres modified it).
>>
>> What are everyone's thoughts on this?
>>
>
> This will generate extra traffic. i think it  must be an option in the 
> model for example. 
> *
> *
> *self.returning = "*"*
> **
> *
> *
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-core/-/t5Xtn1dbTwYJ.
To post to this group, send email to rubyonrails-core@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-core+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to