> -Original Message-
> From: Michael Glaesemann [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 19 November 2005 4:07 p.m.
> To: Jeremy Palmer
> Cc: pgsql-sql@postgresql.org
> Subject: Re: [SQL] DISTINCT ON
>
> [Please don't top post. It makes the post harder to read. I've
> reordered the post
-Original Message-
From: Michael Glaesemann [mailto:[EMAIL PROTECTED]
Sent: Saturday, 19 November 2005 12:28 p.m.
On Nov 19, 2005, at 7:49 , Jeremy Palmer wrote:
SELECT DISTINCT ON (vector_id, obs_type)
id
FROM observation
ORDER BY vector_id,
obs_type,
date
Thanks for the reply.
Unfortunately that does not work as "id" column needs to be included in the
group by statement or be used in an aggregate function. If I did this it
definitely would note return the correct answer, as the "id" column is the
primary key for the table.
Any further suggestions?
On Nov 19, 2005, at 7:49 , Jeremy Palmer wrote:
SELECT DISTINCT ON (vector_id, obs_type)
id
FROM observation
ORDER BY vector_id,
obs_type,
date DESC;
However the documentation also states that "DISTINCT ON" is not
part of the
SQL standard and should be avoided when po
Hi,
I have a table:
observation (
id int4 NOT NULL [PRIMARY KEY],
vector_id NOT NULL [FORGIEN KEY],
obs_type VARCHAR(4) NOT NULL,
date TIMESTAMP NULL
)
I need to select the newest observation id, classify by type, for each
vector (there can be multiple observation ids on each vector)
On 2005-11-11 10:26, Warren Murray wrote:
What is the process to export a PostgreSQL table to XML? How is it done?
Thanks!
Two ways using PSQL:
1. Select HTML output ("\H" command) and then do a very minor amount of
post processing (details left to the reader).
2. Select "expanded" outp
Hello,
I’ve got a database
for a website which is a variant of the ‘show stuff near to me’
sort of thing.
Rather than host this
database on a single server, I have a scheme in mind to break the database up
geographically so that each one can run comfortably on a small server, but
I’
Hi,
ich bin dabei DB-Server zu einem Cluster zusammen zuführen mit
PGCLUSTER. Hat schon jemand von euch damit gearbeitet und kann mir mal
seine Meinung/Erfahrung dazu sagen (positiv oder negativ).
Werde auch meine Erfahrung noch Erfolg hier mal posten.
Server: 7.4.1 (suse9.0)
pgcluster-1.1
Grüs
What is the process to export a PostgreSQL table to XML? How is it done?
Thanks!
Warren L Murray
Booz Allen Hamilton
Phone: 404.518.7940
Email: [EMAIL PROTECTED]
---(end of broadcast)---
TIP 6: explain analyze is your friend
On Fri, Nov 18, 2005 at 09:09:24AM -, Andy Ballingall wrote:
> That's very interesting! I've not used slony yet, so I'll setup some tests
> and try exactly this mechanism.
If you do this with Slony, and have any success, I know that the
folks on the Slony list would dearly like to hear about i
On Thu, Nov 17, 2005 at 02:51:05PM -0800, Dawn Buie wrote:
> I'm just confused about how I should write code to update the selected
> items to remove the 'v.'
>
> Would I use substring? An example would be much appreciated.
You need a combination of overlay and location. The following will
work
Thanks Aidan,
That's very interesting! I've not used slony yet, so I'll setup some tests
and try exactly this mechanism.
What I like about it is that the changes that have to occur to either add a
cell or to split an existing cell into two to manage growing traffic have a
localised effect on the
Hello,
I want to create a trigger in PostgresSQL
In trigger, Before inserting the record, if
data is already in the table, the trigger fire the mesaage that data is already
there, and after that trigger ckeck for next insert statement.
How can
I do this , Please reply.
Regards,
_
Aftab
13 matches
Mail list logo