pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: missive@frontiernet.net
To: pgsql-sql@postgresql.org
Subject: Re: select 5/2???
Date: Thu, 4 Oct 2001 00:23:04 +0000 (UTC)
Message-ID: <9pga58$1b7d$2@news.tht.net> (raw)
References: <9pfg2k$16og$1@news.tht.net>

> 
> I run select 5/2  = 2
> who to get "2.5"
> 

integer/integer = integer
float/integer = float
integer/float = float
integer/integer::float = float


test=# SELECT 5.0/2;
 ?column?
----------
      2.5
(1 row)

test=# SELECT 5/2::float;
 ?column?
---------- 
      2.5




view thread (6+ messages)  latest in thread

Message-ID: <9pga58$1b7d$2@news.tht.net>
Permalink:  ../9pga58$1b7d$2@news.tht.net/
Also on:    postgresql.org/message-id/9pga58$1b7d$2@news.tht.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: missive@frontiernet.net
  Subject: Re: select 5/2???
  In-Reply-To: <9pga58$1b7d$2@news.tht.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox