[SQL] Group by 15 Minute Steps

2005-03-20 Thread Martin Knipper
Hi, does anyone hava an idea how to group data e.g by 15 minute steps? I have the following data in my "data_diff" table [...] snmp=# \d data_diff Table "public.data_diff" Column | Type | Modifiers -+-+---

Re: [SQL] COUNT(*) to find records which have a certain number of

2004-09-26 Thread Martin Knipper
model_fk where t.type_name='xyz' group by b.brand_name,m.model_name having count(m.model_name)>0; Greetings, Martin -- Martin Knipper www : http://www.mk-os.de Mail : [EMAIL PROTECTED] ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [SQL] degradation in performance

2004-09-21 Thread Martin Knipper
" command instead of "insert into". Greetings, Martin -- Martin Knipper www : http://www.mk-os.de Mail : [EMAIL PROTECTED] ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

pg_dump inside function (was: Re: [SQL] (No Subject))

2004-06-11 Thread Martin Knipper
Please provide a subject for futher mailings to this list. Am 11.06.2004 06:36 schrieb William Anthony Lim: > is it possible to dump within procedural language/SQL syntax? > Using pg_dump from console is very confusing for some end user > who don't have Linux skills. so I decide to create a functi

Re: [SQL] Function valid only for one table

2004-05-19 Thread Martin Knipper
Hi Tom, Am 19.05.2004 19:33 schrieb Tom Lane: > Martin Knipper <[EMAIL PROTECTED]> writes: > >>I thought about a mixture of object orientation and a normal table >>for a relational database. >>someFunction() is a method for the object/table someTable. > > Per

Re: [SQL] Function valid only for one table

2004-05-19 Thread Martin Knipper
Am 19.05.2004 18:33 schrieb Richard Huxton: > Martin Knipper wrote: > >>Hi there, >> >>is it possible to define a function that is only valid in a context >>of one table ? >> >>For Example: >> >>select someFunction() from someTable; >>-&

[SQL] Function valid only for one table

2004-05-19 Thread Martin Knipper
Hi there, is it possible to define a function that is only valid in a context of one table ? For Example: select someFunction() from someTable; -> OK select someFunction() from anotherTable; -> Error: someFunction unkown Of course both tables are in the same database. Greetings, Martin -

Re: [SQL] Rank

2004-05-05 Thread Martin Knipper
et result like that create temporary sequence ranking; select *,nextval('ranking') as rank from yourTable order by site_name asc; Greetins, Martin Knipper -- Martin Knipper [EMAIL PROTECTED] http://www.mk-os.de ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [SQL] Rank

2004-05-04 Thread Martin Knipper
Am 04.05.2004 18:47 schrieb Rob: > Martin Knipper wrote: >>Am 04.05.2004 16:11 schrieb george young: >>>On Sun, 2 May 2004 02:22:37 +0800 >>>"Muhyiddin A.M Hayat" <[EMAIL PROTECTED]> threw this fish to the penguins: >>> &g

Re: [SQL] Rank

2004-05-04 Thread Martin Knipper
.point; > > id | site_name | point | rank > +---+---+-- > 3 | Site D|22 |4 > 2 | Site B|90 |2 > 4 | Site X|98 |1 > 1 | Site A|40 |3 > (4 rows) > > > -- George Young Another possibilty

Re: [SQL] typecasting numeric(18,4) to varchar/text

2004-05-04 Thread Martin Knipper
ROR: Cannot cast type 'numeric' to 'character varying' demo=# select a::text from a; ERROR: Cannot cast type 'numeric' to 'text' demo=# select '\'' || a || '\'' from a;; ERROR: Unable to identify an operator '||' for typ

Re: [SQL] Problem: Postgresql not starting

2003-11-26 Thread Martin Knipper
Hi, Am 11/26/03 16:29 schrieb [EMAIL PROTECTED]: Hi All I am using postgresql 7.2 on Linux. It does not start when i am trying this /etc/rc.d/init.d/postgresql restart. It give an error saying "postmaster already running". I have done rm -f /var/lib/pgsql/data/postmaster.pid and rm -f /var/run/pos