Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL questions

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: PostgreSQL questions
Date: 2010-03-16 08:51:31
Message-ID: hnngqj$u3c$1@reversiblemaps.ath.cx (view raw or flat)
Thread:
Lists: pgsql-novice
On 2010-03-12, Carel Combrink <s25291930(at)tuks(dot)co(dot)za> wrote:
> Dear PostgreSQL novice list,
>
> I am starting development on an application that requires the use of a  
> Database. I am considering MySQL vs PostgreSQL and have done extensive  
> (perhaps incomplete) research on both of these.
>
> I have 2 questions about PostgreSQL:
> 1.) Is there a difference in running PostgreSQL on Windows vs Linux. I  
> am a Windows user but have a Linux box. For the application I am  
> leaning more to Linux. Is there advantages or factors I should  
> consider when choosing the OS?

It works better on linux, not that it's flaky on windows, 
it's designed from a posix standpoint, and just fits better with the
OS on linux.

> 2.) This question is related to triggers. Can I use a trigger to  
> notify my external application about a change in the database. 

Use notify for this.

Notify is a (postgres specific) SQL command that can be executed as a
query or by a trigger.  it will send an alert to any process that is
listening for that notify.

> I am  
> looking at using QT for development because of its platform  
> independence. Thus the complete question is: Can I notify the QT  
> application that data was added to the database (using a trigger)  
> without having to query the database the whole time?

notify can be listened for using [p]select() in combination with some
libpq calls, you can do that in a thread or poll periodically from 
the application's idle loop.

> The specifications for the application are real-time to semi-real-time  
> thus I need an OS with semi-real-time characteristics (Windows is not  
> as far as I know, that is why Linux is a good option). And I want to  
> notifying the application of changes in the database as soon as they  
> happen, this will help with the real-time aspect.
>
> Hope I can get this sorted soon as development should start asap.


In response to

pgsql-novice by date

Next:From: M CDate: 2010-03-17 12:24:19
Subject: pyPgSQL data retrieval/formatting problem
Previous:From: John GageDate: 2010-03-16 05:27:40
Subject: Re: DIFFERENCE BETWEEN LIKE AND SIMILAR OPERATORS

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group