Scott Marlowe wrote:
On Thu, Oct 16, 2008 at 10:06 PM, Stephan Szabo
<[EMAIL PROTECTED]> wrote:
On Thu, 16 Oct 2008, Scott Marlowe wrote:
On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo
<[EMAIL PROTECTED]> wrote:
On Fri, 17 Oct 2008, Tim Uckun wrote:
Is there a way to change this behavior s
On Thu, Oct 16, 2008 at 10:06 PM, Stephan Szabo
<[EMAIL PROTECTED]> wrote:
>
> On Thu, 16 Oct 2008, Scott Marlowe wrote:
>
>> On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo
>> <[EMAIL PROTECTED]> wrote:
>> > On Fri, 17 Oct 2008, Tim Uckun wrote:
>> >
>> >> Is there a way to change this behavior so
On Thu, 16 Oct 2008, Scott Marlowe wrote:
> On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo
> <[EMAIL PROTECTED]> wrote:
> > On Fri, 17 Oct 2008, Tim Uckun wrote:
> >
> >> Is there a way to change this behavior so that an attempt to set the
> >> column to NULL will result in the default value bei
On Thu, Oct 16, 2008 at 10:01 PM, Stephan Szabo
<[EMAIL PROTECTED]> wrote:
> On Fri, 17 Oct 2008, Tim Uckun wrote:
>
>> Is there a way to change this behavior so that an attempt to set the
>> column to NULL will result in the default value being put in the
>> field?
>
> I don't think so specificall
On Thu, Oct 16, 2008 at 9:58 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
> On Fri, Oct 17, 2008 at 4:40 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote:
>> On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
>>> Hey all.
>>>
>>> I am using postgres 8.3 with a rails application. I have a
On Fri, 17 Oct 2008, Tim Uckun wrote:
> Is there a way to change this behavior so that an attempt to set the
> column to NULL will result in the default value being put in the
> field?
I don't think so specifically with default, but you could use a before
trigger instead that would put in a value
On Fri, Oct 17, 2008 at 4:40 PM, Scott Marlowe <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
>> Hey all.
>>
>> I am using postgres 8.3 with a rails application. I have a column
>> defined like this.
>>
>> ALTER TABLE provisions ADD COLUMN provide
>
> Are you using the ruby-pg interface? I was under the impression it
> handled this properly.
>
I am using postgres-pr
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
> Hey all.
>
> I am using postgres 8.3 with a rails application. I have a column
> defined like this.
>
> ALTER TABLE provisions ADD COLUMN provider_id integer;
> ALTER TABLE provisions ALTER COLUMN provider_id SET STORAGE PLAIN;
On Thu, Oct 16, 2008 at 9:26 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
>> Not sure how you do this in rails but if you use DEFAULT in the query it
>> works:
>>
>>> create table a(a int default 5);
>> CREATE TABLE
>>
>>> insert into a(a) values (DEFAULT);
>> INSERT 0 1
>
> Unfortunately the SQL is be
> Not sure how you do this in rails but if you use DEFAULT in the query it
> works:
>
>> create table a(a int default 5);
> CREATE TABLE
>
>> insert into a(a) values (DEFAULT);
> INSERT 0 1
Unfortunately the SQL is being generated by the ORM. I really don't
want to bypass the ORM that would be wa
On Thu, Oct 16, 2008 at 9:09 PM, Tim Uckun <[EMAIL PROTECTED]> wrote:
> Hey all.
>
> I am using postgres 8.3 with a rails application. I have a column
> defined like this.
>
> ALTER TABLE provisions ADD COLUMN provider_id integer;
> ALTER TABLE provisions ALTER COLUMN provider_id SET STORAGE PLAIN;
Tim Uckun wrote:
Hey all.
I am using postgres 8.3 with a rails application. I have a column
defined like this.
ALTER TABLE provisions ADD COLUMN provider_id integer;
ALTER TABLE provisions ALTER COLUMN provider_id SET STORAGE PLAIN;
ALTER TABLE provisions ALTER COLUMN provider_id SET NOT NULL;
13 matches
Mail list logo