Thread: Can Postgresql run in MS Windows

Can Postgresql run in MS Windows

From
chrizkoh@yahoo.com (Christopher Koh)
Date:
Is it possible to make it run?

Re: Can Postgresql run in MS Windows

From
"Luis H"
Date:
http://www.postgresql.org/docs/faqs/text/FAQ_MSWIN
----- Original Message -----
From: "Christopher Koh" <chrizkoh@yahoo.com>
To: <pgsql-novice@postgresql.org>
Sent: Saturday, August 30, 2003 7:40 PM
Subject: [NOVICE] Can Postgresql run in MS Windows


> Is it possible to make it run?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>


ORDER BY question

From
"Luis H."
Date:
I have two tables, table A contains users (id, username, password) , and
table B contains a row that signifies the 'owner' of each particular entry,
referencing an id in A.

so example

table A
id  username password
------------------------
1   me           *****
2   you          *******

table B
description           owner
-------------------------
'something cool'   2
'another thing'      1


What I want to do is do a query where I order table B by owner, but
alphabetically by username. The problem, obviously, is that table B only
contains id's (numbers, indexing to A), which don't correspond to the
alphabetical order of the usernames.

I'm not very familiar with subqueries, but I expect I should be able to
somehow select ID's from table A ordered by username, and use this index to
order table B by owner.

Hopefully I made sense.

Thanks in advance!



Re: ORDER BY question

From
Bruno Wolff III
Date:
Please don't start new topics by by replying to unrelated messages.

On Sun, Aug 31, 2003 at 21:44:12 -0400,
  "Luis H." <pgsql-novice@geekhouse.no-ip.com> wrote:
> I have two tables, table A contains users (id, username, password) , and
> table B contains a row that signifies the 'owner' of each particular entry,
> referencing an id in A.
>
> What I want to do is do a query where I order table B by owner, but
> alphabetically by username. The problem, obviously, is that table B only
> contains id's (numbers, indexing to A), which don't correspond to the
> alphabetical order of the usernames.

You should do a join on A and B and then you can order the output by
fields in both A and B.

Re: ORDER BY question

From
"Luis H."
Date:
Thanks for the info! Group by should do the trick.

Why does replying to an unrelated message create an issue, btw? I changed
the subject, headers and contents of the e-mail. Or at least I thought I
did!

Also, why do people reply to both the message sender and the mailing list?
Doesn't it just arrive duplicated in the sender's mailbox.

Cheers,
- Luis
----- Original Message -----
From: "Bruno Wolff III" <bruno@wolff.to>
To: "Luis H." <pgsql-novice@geekhouse.no-ip.com>
Cc: <pgsql-novice@postgresql.org>
Sent: Monday, September 01, 2003 3:04 AM
Subject: Re: [NOVICE] ORDER BY question


> Please don't start new topics by by replying to unrelated messages.
>
> On Sun, Aug 31, 2003 at 21:44:12 -0400,
>   "Luis H." <pgsql-novice@geekhouse.no-ip.com> wrote:
> > I have two tables, table A contains users (id, username, password) , and
> > table B contains a row that signifies the 'owner' of each particular
entry,
> > referencing an id in A.
> >
> > What I want to do is do a query where I order table B by owner, but
> > alphabetically by username. The problem, obviously, is that table B only
> > contains id's (numbers, indexing to A), which don't correspond to the
> > alphabetical order of the usernames.
>
> You should do a join on A and B and then you can order the output by
> fields in both A and B.
>



Re: ORDER BY question

From
Bruno Wolff III
Date:
On Mon, Sep 01, 2003 at 09:57:04 -0400,
  "Luis H." <pgsql-novice@geekhouse.no-ip.com> wrote:
> Thanks for the info! Group by should do the trick.
>
> Why does replying to an unrelated message create an issue, btw? I changed
> the subject, headers and contents of the e-mail. Or at least I thought I
> did!

Because message threading isn't tracked by subject. There are other
headers that indicate a message is a reply and you didn't change the one
your mail client uses. Doing this hides your message in a thread with
a different topic.

> Also, why do people reply to both the message sender and the mailing list?
> Doesn't it just arrive duplicated in the sender's mailbox.

How do we know you are subscribed to the list?

If you don't want to be copied personally, setting the mail-followup-to
header will do this for many clients.

Re: ORDER BY question

From
"Luis H."
Date:
I looked into the headers, and saw all the thread tracking info. I had no
idea this was going on in the background. Sorry for any confusion this might
have caused in your mail clients!

- Luis

----- Original Message -----
From: "Bruno Wolff III" <bruno@wolff.to>
To: "Luis H." <pgsql-novice@geekhouse.no-ip.com>
Cc: <pgsql-novice@postgresql.org>
Sent: Monday, September 01, 2003 3:09 PM
Subject: Re: [NOVICE] ORDER BY question


> On Mon, Sep 01, 2003 at 09:57:04 -0400,
>   "Luis H." <pgsql-novice@geekhouse.no-ip.com> wrote:
> > Thanks for the info! Group by should do the trick.
> >
> > Why does replying to an unrelated message create an issue, btw? I
changed
> > the subject, headers and contents of the e-mail. Or at least I thought I
> > did!
>
> Because message threading isn't tracked by subject. There are other
> headers that indicate a message is a reply and you didn't change the one
> your mail client uses. Doing this hides your message in a thread with
> a different topic.
>
> > Also, why do people reply to both the message sender and the mailing
list?
> > Doesn't it just arrive duplicated in the sender's mailbox.
>
> How do we know you are subscribed to the list?
>
> If you don't want to be copied personally, setting the mail-followup-to
> header will do this for many clients.
>



Re: Can Postgresql run in MS Windows

From
Al Hulaton
Date:
Hello Christopher,

On Sat, 2003-08-30 at 16:40, Christopher Koh wrote:
> Is it possible to make it run?

Many of the other postings answered your question, but one thing to keep
in mind when running PostgreSQL + Cygwin, because Cygwin is an emulation
layer, it's not as robust as running it straight on Linux.

For instance, our Mammoth PostgreSQL server for Windows is hard coded to
a limit of 50 concurrent connections. Anything about that, things get
unstable. For that reason, most of our clients run PostgreSQL + Cygwin
in low-load or development environments.

There will be a native community version for Windows soon and I presume
the performance will be better. Until then PostgreSQL + Cygwin is
completely usable, just not as scalable as a pure Linux solution.


Best,
Al Hulaton    |  Sr. Account Engineer  |  Command Prompt, Inc.
503.222.2783  |  ahulaton@commandprompt.com
Home of Mammoth PostgreSQL and 'Practical PostgreSQL'
Managed PostgreSQL, Linux services and consulting
Read and Search O'Reilly's 'Practical PostgreSQL' at
http://www.commandprompt.com


Re: ORDER BY question

From
Nabil Sayegh
Date:
Am Mo, 2003-09-01 um 03.44 schrieb Luis H.:
> I have two tables, table A contains users (id, username, password) , and
> table B contains a row that signifies the 'owner' of each particular entry,
> referencing an id in A.
>
> so example
>
> table A
> id  username password
> ------------------------
> 1   me           *****
> 2   you          *******
>
> table B
> description           owner
> -------------------------
> 'something cool'   2
> 'another thing'      1
>
>
> What I want to do is do a query where I order table B by owner, but
> alphabetically by username. The problem, obviously, is that table B only
> contains id's (numbers, indexing to A), which don't correspond to the
> alphabetical order of the usernames.

SELECT * FROM a JOIN b ON (a.id=b.owner) ORDER BY a.username
or
SELECT * FROM a, b WHERE a.id=b.owner ORDER BY a.username

If you had the columnnames the same in A and B for the id you could do:
SELECT * FROM a JOIN B USING (id_a) ORDER BY a.username

> I'm not very familiar with subqueries, but I expect I should be able to
> somehow select ID's from table A ordered by username, and use this index to
> order table B by owner.

No need for subselects here

--
 e-Trolley Sayegh & John, Nabil Sayegh
 Tel.: 0700 etrolley /// 0700 38765539
 Fax.: +49 69 8299381-8
 PGP : http://www.e-trolley.de