Re: insert a -1 into a bigint ?

From: kevin kempter <kevin(at)kevinkempterllc(dot)com>
To: Shane Ambler <pgsql(at)Sheeky(dot)Biz>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: insert a -1 into a bigint ?
Date: 2008-05-20 19:42:52
Message-ID: F65C8721-9B35-4645-8DF1-B2A12DFD05C3@kevinkempterllc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

wow, good catch.

Thanks for taking the time to look.

On May 20, 2008, at 1:22 PM, Shane Ambler wrote:

> kevin kempter wrote:
>> Hi All:
>
>> I want to insert some data along with a -1 for two of the bigint
>> columns. like this:
>> insert into seg_id_tmp7
>> ( customer_srcid,
>> show_srcid,
>> show_name,
>> season_srcid,
>> season_name,
>> episode_srcid,
>> episode_name,
>> segment_type_id,
>> segment_type,
>> segment_srcid,
>> segment_name,
>> create_dt )
>> select
>> t8.customer_srcid,
>> t8.show_srcid,
>> t8.show_name,
>> t8.season_srcid,
>> t8.season_name,
>> t8.episode_srcid,
>> t8.episode_name
>> -1::bigint ,
>> 'none',
>> -1::bigint ,
>> 'none',
>> (select start_dt from load_start_date)
>> from
>> seg_id_tmp8 t8
>> ;
>> I've also tried without the ::bigint cast on the above query.
>> I always get this error:
>> sql:load_sl_cd_segment_dim.sql:237: ERROR: operator does not
>> exist: character varying - bigint
>
> Try a comma before the -1
>
> You are trying to enter - "t8.episode_name -1::bigint" into the column
>
> hence - "character varying - bigint" does not work
>
>
>
> --
>
> Shane Ambler
> pgSQL (at) Sheeky (dot) Biz
>
> Get Sheeky @ http://Sheeky.Biz
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Hyatt, Gordon 2008-05-21 13:27:51 v8.2.6->8.2.7 upgrade renamed /var/lib/pgsql
Previous Message Shane Ambler 2008-05-20 19:22:30 Re: insert a -1 into a bigint ?