pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Aggregate Functions Template
4+ messages / 3 participants
[nested] [flat]

* Aggregate Functions Template
@ 2005-05-19 19:17 Mark Fenbers <Mark.Fenbers@noaa.gov>
  2005-05-19 20:56 ` Re: Aggregate Functions Template Michael Fuhr <mike@fuhr.org>
  0 siblings, 1 reply; 4+ messages in thread

From: Mark Fenbers @ 2005-05-19 19:17 UTC (permalink / raw)
  To: pgsql-sql

I need to create an aggregate function to do some math not currently 
provided by the available tools.  Can someone point to an example 
aggregate function syntax that I can use as a template for my own 
function.  I'm still a little green on some aspects of PostgreSQL and am 
drawing a blank on how to do this properly from scratch.

Thanks for the help!

Mark

Attachments:

Mark.Fenbers.vcf (text/x-vcard, 281B) download begin:vcard fn:Mark Fenbers n:Fenbers;Mark org:DoC/NOAA/NWS/OHRFC adr:;;1901 South SR 134;Wilmington;OH;45177-9708;USA email;internet:Mark.Fenbers@noaa.gov title:Sr. HAS Meteorologist tel;work:937-383-0430 x246 x-mozilla-html:TRUE url:http://weather.gov/ohrfc version:2.1 end:vcard
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Aggregate Functions Template
  2005-05-19 19:17 Aggregate Functions Template Mark Fenbers <Mark.Fenbers@noaa.gov>
@ 2005-05-19 20:56 ` Michael Fuhr <mike@fuhr.org>
  2005-05-20 10:25   ` Re: Aggregate Functions Template Mark Fenbers <Mark.Fenbers@noaa.gov>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Fuhr @ 2005-05-19 20:56 UTC (permalink / raw)
  To: Mark Fenbers <Mark.Fenbers@noaa.gov>; +Cc: pgsql-sql

On Thu, May 19, 2005 at 03:17:07PM -0400, Mark Fenbers wrote:
>
> I need to create an aggregate function to do some math not currently 
> provided by the available tools.  Can someone point to an example 
> aggregate function syntax that I can use as a template for my own 
> function.  I'm still a little green on some aspects of PostgreSQL and am 
> drawing a blank on how to do this properly from scratch.

The General Bits newsletter has a few examples that might be helpful,
even if they're not quite what you're after:

http://www.varlena.com/varlena/GeneralBits/109.php
http://www.varlena.com/varlena/GeneralBits/4.html

There are sure to be some examples in the list archives -- just
search for "create aggregate":

http://archives.postgresql.org/

If these links don't help, then please post more details about what
you're trying to do and what trouble you're having.  If you have
any code that doesn't work the way you want but that helps show
what you're after, then go ahead and post it with an explanation
of what it does (or doesn't do) and what you'd like it to do (or
not do).

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Aggregate Functions Template
  2005-05-19 19:17 Aggregate Functions Template Mark Fenbers <Mark.Fenbers@noaa.gov>
  2005-05-19 20:56 ` Re: Aggregate Functions Template Michael Fuhr <mike@fuhr.org>
@ 2005-05-20 10:25   ` Mark Fenbers <Mark.Fenbers@noaa.gov>
  0 siblings, 0 replies; 4+ messages in thread

From: Mark Fenbers @ 2005-05-20 10:25 UTC (permalink / raw)
  To: Michael Fuhr <mike@fuhr.org>; +Cc: pgsql-sql

Yes, your varlena links are what I was looking for as a source of help...

Thanks!
Mark

Michael Fuhr wrote:

>On Thu, May 19, 2005 at 03:17:07PM -0400, Mark Fenbers wrote:
>  
>
>>I need to create an aggregate function to do some math not currently 
>>provided by the available tools.  Can someone point to an example 
>>aggregate function syntax that I can use as a template for my own 
>>function.  I'm still a little green on some aspects of PostgreSQL and am 
>>drawing a blank on how to do this properly from scratch.
>>    
>>
>
>The General Bits newsletter has a few examples that might be helpful,
>even if they're not quite what you're after:
>
>http://www.varlena.com/varlena/GeneralBits/109.php
>http://www.varlena.com/varlena/GeneralBits/4.html
>
>There are sure to be some examples in the list archives -- just
>search for "create aggregate":
>
>http://archives.postgresql.org/
>
>If these links don't help, then please post more details about what
>you're trying to do and what trouble you're having.  If you have
>any code that doesn't work the way you want but that helps show
>what you're after, then go ahead and post it with an explanation
>of what it does (or doesn't do) and what you'd like it to do (or
>not do).
>
>  
>

Attachments:

Mark.Fenbers.vcf (text/x-vcard, 281B) download begin:vcard fn:Mark Fenbers n:Fenbers;Mark org:DoC/NOAA/NWS/OHRFC adr:;;1901 South SR 134;Wilmington;OH;45177-9708;USA email;internet:Mark.Fenbers@noaa.gov title:Sr. HAS Meteorologist tel;work:937-383-0430 x246 x-mozilla-html:TRUE url:http://weather.gov/ohrfc version:2.1 end:vcard
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: Aggregate Functions Template
@ 2005-06-13 21:52 postgres@jal.org
  0 siblings, 0 replies; 4+ messages in thread

From: postgres@jal.org @ 2005-06-13 21:52 UTC (permalink / raw)
  To: pgsql-sql


Hi, Sqlers -

I just installed 8.0.3, and am getting up to speed with the new
features.  First on my list is Tablespaces. In the docs, I see this:


	Note:  There is usually not much point in making more than one
	tablespace per logical file system, since you cannot control the
	location of individual files within a logical file system. However,
	PostgreSQL does not enforce any such limitation, and indeed it is
	not directly aware of the file system boundaries on your system. It
	just stores files in the directories you tell it to use. 

(http://www.postgresql.org/docs/8.0/interactive/manage-ag-tablespaces.html)

I assume this is from the perspective of performance, correct? I was
planning on doing a tablespace per logical project, as we internally
structure most other things that way, and also to ease moving things
around in the event we restructure filesystems, move things between
servers, etc.

In general, at least on our development machines, I was planning on
using them to make data management easier.  I note that I'm not seeing
any Oracle style alter tablespace ... commands for moving things around,
but it appears from that page that it is possible to do by changing the
$PGDATA/pg_tblspc/$symlink and updating pg_tablespace (even if doing so
is 'not recommended'). 

Is this a flawed use of tablespaces?

Thanks,

-j


-- 
Jamie Lawrence                                        jal@jal.org
"Reality must take precedence over public relations, for nature cannot be
fooled."
   - Richard P. Feynman





^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2005-06-13 21:52 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-05-19 19:17 Aggregate Functions Template Mark Fenbers <Mark.Fenbers@noaa.gov>
2005-05-19 20:56 ` Michael Fuhr <mike@fuhr.org>
2005-05-20 10:25   ` Mark Fenbers <Mark.Fenbers@noaa.gov>
2005-06-13 21:52 Re: Aggregate Functions Template postgres@jal.org

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