[GENERAL] PostgreSQL on NT: new cygwin?

2000-06-19 Thread Andrea Aime

Hi people, 
I'm trying to install pgsql on NT using cygwin's 
last release... well, it seems quite different
from b20, you already got cygwin-ipc and 
there's no more a cygwin-b20 directory, the
root directory seems to be unix like even
if you don't install Andy Piper tools... 
is there anyone who has experience on that
kind of installation? I've tried to download
http://www.s34.co.jp/~luster/pgsql/cygwin32_ipc-1.03-bin-patched.tar.bz2
but bzip2 keeps telling me that this package is
corrupted. 
Anyone has some experience?
Bye
Andrea



Re: [GENERAL] Lock rekord

2000-06-19 Thread Herbert Liechti

"Pawe³ Dubin" wrote:

> List z dnia:  Sat, 17 Jun 2000,  :
> > > I usually prefer the following trick for preventing long locking
> > > times. On every
> > > table I define a timestamp field which is updated every time the record is
> > > written to the database. If a user edits a record (without
> > > locking) and commit his changes
> > > the timestamp is returned from the client program unchanged. The program
> > > reads the record again for update and compares the timestamp from
> > > the database
> > > and the timestamp from the user program.  If the timestamp has changed
> > > in the meantime the record was updated from someone else and the
> > > transaction will be rejected.
>
> and all the work done by the user (filling long form) gone out

Yes, but how often this really occurs?  You may handle this case in your
application i.e. by showing the differences between the record in the
database and the changes submitted by the user. I made very good
experience in the past 10 years with this system even in big applications
where a large number of users were using the database
concurrently.

>
>
> >
> > What happens if someone else updates the record *just* after the record is
> > reread for update and timestamp compared?

If you reread the record for updating nobody else should be able to
update the record. The record is locked. The method I suggested is
a way to keep the locking times as short as possible.

>
>
> It's ok. I do the same.
> 1. Update lock field for marked to transaction (everyone else need to know It
> is locked)

And what happens if a user is closing his browser i.e. in a web application?
What are you doing with the record marked as locked?

Regards Herbie


--

Herbert Liechti E-Mail: [EMAIL PROTECTED]
ThinX networked business servicesStahlrain 10, CH-5200 Brugg







[GENERAL] A Query on PG_ tables

2000-06-19 Thread NRonayette

Hi everybody,

I'm using Postgresql 7.0.

I want to find, by a query on the postgres table (like pg_class,
pg_attribute, pg_trigger, etc), the name of all the colonnes  that
are foreign key on my base.

Pg_trigger gives me some information about the foreigns key i added on
my tables (name, id etc..) but i don't know how to join this information
with another pg_ (for example, pg_attribute or else) to find the
name of my colonnes that are foreign key.

Someone have an idear ?

I hope i was clear with my poor English...

Thanks for your answers.

Nicolas.