Re: Casting

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Casting
Дата
Msg-id Pine.LNX.4.30.0101051940280.979-100000@peter.localdomain
обсуждение исходный текст
Ответ на Casting  (Thomas SMETS <tsmets@altern.org>)
Список pgsql-sql
Thomas SMETS writes:

> I'm removing charaters from a String which should be numbers.
> I then want to make calculations on these numbers (calculate the ISBN
> number).

(You might want to look into contrib/isbn_issn for an isbn type.)

> Do I have to cast the char into int's before I can do the calulations.

Depends on the calculation.  I'd just try to see if it works.  When in
doubt add casts.

> Also I looked in the User manual but could not find the modulo function
> where is it ?

5 % 4
mod(5, 4)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


В списке pgsql-sql по дате отправления:

Предыдущее
От: Najm Hashmi
Дата:
Сообщение: pqReadData()
Следующее
От: "Richard Huxton"
Дата:
Сообщение: Re: Non-procedural field merging?