Re: [SQL] the best way to get the first record from each group

2005-02-07 Thread Michael Fuhr
On Tue, Feb 08, 2005 at 03:20:21AM +0100, PFC wrote: > Anyway, it was fun to experiment with that ! Interesting -- thanks for taking the time. -- Michael Fuhr http://www.fuhr.org/~mfuhr/ ---(end of broadcast)--- TIP 9: the planner will ignore you

Re: [SQL] the best way to get the first record from each group

2005-02-07 Thread PFC
I don't really gr0k your field names so I'll use an easier example : CREATE TABLE groups ( group_id SERIAL PRIMARY KEY, group_name TEXT NULL ) WITHOUT OIDS; CREATE TABLE people ( user_id SERIAL PRIMARY KEY, group_id INTEGER NOT NULL REFERENCES groups(group_id), score INTEGER NOT NULL ) WITH

Re: [SQL] How can I use large object on PostgreSQL Linux

2005-02-07 Thread Premsun Choltanwanich
I use SuSE only.>>> K(AÖPFERL Robert <[EMAIL PROTECTED]> 07-Feb-05 4:05 PM >>> Are you using Fedora with SELinux or just SELinux? -Original Message-From: Premsun Choltanwanich [mailto:[EMAIL PROTECTED]Sent: Montag, 07. Februar 2005 05:41To: pgsql-sql@postgresql.orgSubject: [SQL] How can

Re: [SQL] the best way to get the first record from each group

2005-02-07 Thread Michael Fuhr
On Tue, Feb 08, 2005 at 10:36:17AM +1000, q2005 wrote: > > Is there any better alternative to get the first record from each group? PostgreSQL has a non-standard SELECT DISTINCT ON query for just this purpose. http://www.postgresql.org/docs/8.0/static/queries-select-lists.html#QUERIES-DISTINCT ht

[SQL] the best way to get the first record from each group

2005-02-07 Thread q2005
Hi, Is there any better alternative to get the first record from each group? "subno" is an integer. The record with the smallest subno in each group is the first record in the group. select itemno, measureunit, extaxprice from itmt_purchase where subno in (select min(subno)as subno from itm

[SQL]

2005-02-07 Thread Joel Fradkin
In reading in the manual it seems the new database is based on template0. I created my first database (wazagua) from the command line using dbcreate wazagua. It results in CREATE DATABASE wazagua WITH OWNER = postgres ENCODING = 'SQL_ASCII'; When I created a test data base to load my ba

[SQL] Red hat 3 AS when uptodate is it running 2.6 Kernel?

2005-02-07 Thread Joel Fradkin
Any one running Redhat 3 AS? Is it using the new Kernel when it is up to date? Joel Fradkin   Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel.  941-753-7111 ext 305   [EMAIL PROTECTED] www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tool

Re: [SQL] Rule problem with OLD / NEW record set

2005-02-07 Thread Christoph Haller
Ralph Graulich wrote: > > Hello everyone, > > given is a table with a version history kind of thing I am currently > working on. Upon this table there is a view and the application interacts > with the view only, updating/inserting/deleting is controlled by rules. It > seems like the record set "

Re: [SQL] How can I use large object on PostgreSQL Linux Version?

2005-02-07 Thread KÖPFERL Robert
Are you using Fedora with SELinux or just SELinux? -Original Message-From: Premsun Choltanwanich [mailto:[EMAIL PROTECTED]Sent: Montag, 07. Februar 2005 05:41To: pgsql-sql@postgresql.orgSubject: [SQL] How can I use large object on PostgreSQL Linux Version? For first inform

Re: [SQL] postgres8 install on fedora core 3 (or redhat4 beta AS

2005-02-07 Thread KÖPFERL Robert
This seems more less rpm-related. However: Already tried to uninstall the old packages? # man rpm -Original Message-From: Joel Fradkin [mailto:[EMAIL PROTECTED]Sent: Samstag, 05. Februar 2005 23:36To: pgsql-sql@postgresql.orgSubject: [SQL] postgres8 install on fedora core