Re: Can't cast bigint to smallint?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can't cast bigint to smallint?
Date: 2001-10-24 23:41:39
Message-ID: 26738.1003966899@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> At 16:09 24/10/01 -0400, Tom Lane wrote:
>> Huh? There's never been a cast from int8 to int2. I checked 7.0 and
>> 7.1, they both complain as well:

> Is this a policy decision, or just a case where noone has had a chance to
> do it?

Just a missing feature. The code additions would be trivial --- but
would require an initdb to add the catalog entries. I'm loath to do it
so close to beta.

>> Where exactly is pg_dump failing?

> The problem in in the code to re-enable triggers:
> ...reltriggers = (select Count(*)....
> So perhaps this version now has Count returning a bigint rather than an int?

Yes, that's what changed. Perhaps change the code to look like
(select count(*)::integer ...

On the other hand, that's no answer for people trying to load existing
dump files into 7.2.

Perhaps we should just do another catalog update and not worry about it.
We just had one earlier this week, so I suppose another wouldn't make
all that much difference. Comments?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-10-24 23:49:06 Re: Can't cast bigint to smallint?
Previous Message Christian Meunier 2001-10-24 23:37:44 Cache query plan..