Re: Casting

From: "rob" <rob(at)cabrion(dot)com>
To: "Thomas SMETS" <tsmets(at)altern(dot)org>, "psql novice" <pgsql-novice(at)postgresql(dot)org>, "psql sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Casting
Date: 2001-01-05 13:24:34
Message-ID: 000a01c0771a$d8901470$4100fd0a@cabrion.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice pgsql-sql

Yes. Casts are done like this:

SomeFiled::int4

or SomeField::text

Double colons is the key '::'
--rob

----- Original Message -----
From: "Thomas SMETS" <tsmets(at)altern(dot)org>
To: "psql novice" <pgsql-novice(at)postgresql(dot)org>; "psql sql"
<pgsql-sql(at)postgresql(dot)org>
Sent: Thursday, January 04, 2001 7:31 PM
Subject: Casting

>
>
> Hi,
>
> In pgsql
>
> I'm removing charaters from a String which should be numbers.
> I then want to make calculations on these numbers (calculate the ISBN
> number).
>
> Do I have to cast the char into int's before I can do the calulations.
>
> Also I looked in the User manual but could not find the modulo function
> where is it ?
>
> tx,
>
> Thomas,
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> Thu Jan 4 20:19:03 CET 2001
>
> Thomas SMETS e-mail : tsmets(at)altern(dot)org
> Av. de la Brabançonne 133 / 3 Tel. : +32 (0)2 742. 05. 94.
> 1030 Bruxelles
> ======= Quote of the Day =========
> Jealousy is all the fun you think they have.
> ========= End of Quote ===========
>

In response to

  • Casting at 2001-01-05 00:31:26 from Thomas SMETS

Browse pgsql-novice by date

  From Date Subject
Next Message Paul Skinner 2001-01-05 17:43:02 Determining parent.
Previous Message Andrew McMillan 2001-01-05 09:48:33 Re: Question on setting up trigger.

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2001-01-05 16:53:49 Re: Non-procedural field merging?
Previous Message Richard Huxton 2001-01-05 09:59:20 Non-procedural field merging?