pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-novice@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] Select last there dates
Date: Thu, 21 Jun 2007 15:24:40 +0200
Message-ID: <20070621132440.GM1405@a-kretschmer.de> (raw)
In-Reply-To: <1c23c8e70706210600he74293ci83bdbc557ee2dba8@mail.gmail.com>
References: <1c23c8e70706210118h6b9490e3s11e2a6ba15cdff6c@mail.gmail.com>
	<20070621095025.GG1405@a-kretschmer.de>
	<1c23c8e70706210600he74293ci83bdbc557ee2dba8@mail.gmail.com>

am  Thu, dem 21.06.2007, um 16:00:05 +0300 mailte Loredana Curugiu folgendes:
> So Andreas, would you please give some more explanations
> on your solution? I didn't work with functions and aggregate till
> now.

I will try it, but i'm not a nativ english speaker and thats why i have
some problems...

> 
> I don't understand how this comma_aggregate works. I can see that this
> function it is defined with two arguments, but the aggredate it is called
> with a single argument.

An aggregate needs among others a so called 'SFUNC' with 2 parameters:
internal-state and next data item. It returns the next-internal-state.

This is explained here:
http://www.postgresql.org/docs/8.1/interactive/sql-createaggregate.html

> 
> And what is LANGUAGE sql IMMUTABLE STRICT ?

An IMMUTABLE function can't modify the database
http://www.postgresql.org/docs/current/static/xfunc-volatility.html


STRICT:
http://www.postgresql.org/docs/8.2/static/xfunc-c.html

,----[  ]
| Notice that we have specified the functions as "strict", meaning that
| the system should automatically assume a null result if any input value
| is null.
`----



Andreas
-- 
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net



view thread (9+ messages)  latest in thread

Message-ID: <20070621132440.GM1405@a-kretschmer.de>
Permalink:  ../20070621132440.GM1405@a-kretschmer.de/
Also on:    postgresql.org/message-id/20070621132440.GM1405@a-kretschmer.de

 · 

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: andreas.kretschmer@schollglas.com, pgsql-novice@postgresql.org
  Subject: Re: [SQL] Select last there dates
  In-Reply-To: <20070621132440.GM1405@a-kretschmer.de>

* 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