Re: Regarding select distinct ...query

From: Christoph Dalitz <christoph(dot)dalitz(at)hs-niederrhein(dot)de>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: "Prachi Jain" <prachijain3(at)rediffmail(dot)com>, pgsql-general(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Regarding select distinct ...query
Date: 2002-12-19 08:18:34
Message-ID: 20021219091834.17c61ea4.christoph.dalitz@hs-niederrhein.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 18 Dec 2002 19:12:40 -0500
Greg Stark <gsstark(at)mit(dot)edu> wrote:
>
> In the current situation we have a perfectly fine standard SQL query that runs
> fine on other databases but fails on postgres. And the only way to "fix" it
> for postgres is to add a non-standard cast to it that won't work on the other
> databases.
>
Most users on this list seem to prefer the Postgres specific odd variant of
a cast (::datatype). This will fail on all other databases of course, so
don't use it.

Use the SQL2 function CAST(att AS datatype) instead.

Suggestion: the cast variant '::' should be deprecated in the docs.

Christoph Dalitz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message frbn 2002-12-19 09:05:45 Re: SQL alternative to pg_dump
Previous Message 帅猛 2002-12-19 08:03:23 argument number