pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Travers <chris@travelamericas.com>
To: Michael Glaesemann <grzm@myrealbox.com>
Cc: Vikas J <vikas.jadhav@codecindia.com>
Cc: postgresql sql list <pgsql-sql@postgresql.org>
Subject: Re: Problem -Postgre sql
Date: Tue, 18 Oct 2005 23:03:05 -0700
Message-ID: <4355E199.2040904@travelamericas.com> (raw)
In-Reply-To: <8FB39706-1EFC-4D9F-ADBD-1311D4B08940@myrealbox.com>
References: <000c01c5ce34$61797c20$6f0aa8c0@codecindia.com>
	<E80C316D-C8FB-457A-8032-ABF6A4A36AB0@myrealbox.com>
	<00b101c5d46e$3cd6fa60$6f0aa8c0@codecindia.com>
	<8FB39706-1EFC-4D9F-ADBD-1311D4B08940@myrealbox.com>

Correct me if I am wrong, but isn't COALESCE standard in this way?

Best Wishes,
Chris Travers
Metatron Technology Consulting

Michael Glaesemann wrote:

> [Please do not email me directly. Please post to the list so others  
> may help and benefit from the discussion.]
>
> On Oct 19, 2005, at 14:30 , Vikas J wrote:
>
>> IsNull in sql server has syntax like isnull(column,substitute)
>> if "column" is null it shows value of "substitute". That can be  
>> achieved
>> with CASE clause in postrgre but I want alternate function.
>
>
> If you look at the doc links I provided below, you will find that  
> COALESCE does exactly this.
>
>> Can you tell me how to write function like MAX() that will work  
>> directly  on
>> colmuns. I want to create my own function that will not need table  
>> name as
>> paramter.
>> it shld work similarly to max() function in postgre.
>
>
> [Again, it's PostgreSQL or Postgres. It is *not* spelled "postgre".]
>
> In my experience, the max() aggregate function does not require table  
> names as parameters and work on columns directly.
> http://www.postgresql.org/docs/8.0/interactive/functions-aggregate.html
>
> I suggest you take some time to look at the docs. They're quite  
> extensive and helpful.
> http://www.postgresql.org/docs/8.0/interactive/index.html
>
>
> Michael Glaesemann
> grzm myrealbox com
>
>
>>> I'm not quite sure what the ISNULL() function does in SQL Server, but
>>> it sounds like it might be similar to either COALESCE or the IS NULL
>>> expression.
>>>
>>> These pages might help you:
>>>
>>> COALESCE
>>> http://www.postgresql.org/docs/8.0/interactive/functions-
>>> conditional.html#AEN12056
>>>
>>> IS NULL
>>> http://www.postgresql.org/docs/8.0/interactive/functions- 
>>> comparison.html
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>               http://archives.postgresql.org
>
>




view thread (6+ messages)  latest in thread

Message-ID: <4355E199.2040904@travelamericas.com>
Permalink:  ../4355E199.2040904@travelamericas.com/
Also on:    postgresql.org/message-id/4355E199.2040904@travelamericas.com

 · 

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: chris@travelamericas.com, grzm@myrealbox.com, vikas.jadhav@codecindia.com
  Subject: Re: Problem -Postgre sql
  In-Reply-To: <4355E199.2040904@travelamericas.com>

* 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