pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedsql question after upgrade
3+ messages / 3 participants
[nested] [flat]
* sql question after upgrade
@ 2003-02-23 00:58 James Cooper <jim@luckydigital.com>
2003-02-23 01:42 ` Re: sql question after upgrade Neil Conway <neilc@samurai.com>
2003-02-23 02:24 ` Re: sql question after upgrade Peter Eisentraut <peter_e@gmx.net>
0 siblings, 2 replies; 3+ messages in thread
From: James Cooper @ 2003-02-23 00:58 UTC (permalink / raw)
To: pgsql-sql
Hi just upgraded to 7.3.2 and imported my db schema with no probs!
Just wondering... why VOLATILE is being appended to my functions - can anyone ansewer me what this means? - should i be using joins instead, does this make a difference? If so an example of this would be much appreciated!!
CREATE FUNCTION public.get_people_total(int4) RETURNS int8 AS '
select count(person_id) as total from person where person_id IN
(
select cp.person_id from cluster_person cp, cluster c where cp.cluster_id = c.cluster_id and c.c_id = $1 group by cp.person_id
);
' LANGUAGE 'sql' VOLATILE;
cheers all
James
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sql question after upgrade
2003-02-23 00:58 sql question after upgrade James Cooper <jim@luckydigital.com>
@ 2003-02-23 01:42 ` Neil Conway <neilc@samurai.com>
1 sibling, 0 replies; 3+ messages in thread
From: Neil Conway @ 2003-02-23 01:42 UTC (permalink / raw)
To: James Cooper <jim@luckydigital.com>; +Cc: pgsql-sql
On Sat, 2003-02-22 at 19:58, James Cooper wrote:
> Just wondering... why VOLATILE is being appended to my functions - can
> anyone ansewer me what this means?
http://www.ca.postgresql.org/users-lounge/docs/7.3/postgres/sql-createfunction.html
explains the meaning of IMMUTABLE, STABLE, and VOLATILE.
Cheers,
Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: sql question after upgrade
2003-02-23 00:58 sql question after upgrade James Cooper <jim@luckydigital.com>
@ 2003-02-23 02:24 ` Peter Eisentraut <peter_e@gmx.net>
1 sibling, 0 replies; 3+ messages in thread
From: Peter Eisentraut @ 2003-02-23 02:24 UTC (permalink / raw)
To: James Cooper <jim@luckydigital.com>; +Cc: pgsql-sql
James Cooper writes:
> Just wondering... why VOLATILE is being appended to my functions - can
> anyone ansewer me what this means?
Read the reference page for CREATE FUNCTION and then decide whether it's
appropriate for your functions. Old functions get it appended during the
dump because that is how the function was effectively treated in the
version you are dumping from, but you may choose to take advantage of the
finer granularity that is now available.
--
Peter Eisentraut peter_e@gmx.net
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2003-02-23 02:24 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-02-23 00:58 sql question after upgrade James Cooper <jim@luckydigital.com>
2003-02-23 01:42 ` Neil Conway <neilc@samurai.com>
2003-02-23 02:24 ` Peter Eisentraut <peter_e@gmx.net>
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