Thanks in advance.
Luca
_________________________________________________________________
Watch all 9 Live Earth concerts live on MSN. http://liveearth.uk.msn.com
---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?
To get the ID of an UPDATE or DELETE you will need a trigger to be run
on each event. If the trigger you refer to is your own then I would
integrate the change into what you have, if you are referring to
cascading updates/deletes then you will need to add a trigger to suit
your needs.
Within the trigger you have access to 'NEW' and 'OLD' copies of the row
affected, which is where you can get the ID you are after.
(see chapter 37.10)
The information passed with a notify is simply an event name so you may
want a table to store the ID's you want. Maybe with a timestamp that you
app uses to find changes since it last looked. Polling this table can be
an alternate to using notify.
> The application is running on Windows XP and the server is installed on
> Windows Server 2003.
> Any one knows a way to notify my app with the ID of the modified record?
> Any idea is appreciated.
>
> Thanks in advance.
>
> Luca
>
> _________________________________________________________________
> Watch all 9 Live Earth concerts live on MSN. http://liveearth.uk.msn.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>
--
Shane Ambler
pg...@Sheeky.Biz
Get Sheeky @ http://Sheeky.Biz
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
NotifyList = 'The OID is: ' || CAST(new.oid as varchar(10)) || ';';
RAISE NOTICE '%',NotifyList;
--
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com www.andromeda-project.org
631-689-7200 Fax: 631-689-0527
cell: 631-379-0010
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings
Luca.
_________________________________________________________________
The next generation of Hotmail is here! http://www.newhotmail.co.uk/
Returns the number of rows (tuples) in the query result.
int PQntuples(const PGresult *res);
So, my doubt is: if the return type is int instead of unsigned int, is this
function testable for negative return values?
Thanks in advance.
Luca
_________________________________________________________________
The next generation of Hotmail is here! http://www.newhotmail.co.uk
> So, my doubt is: if the return type is int instead of unsigned int,
> is this function testable for negative return values?
A quick glance at the code in fe-exec.c and fe-protocol3.c shows that
the underlying variable starts at 0 as an int and in incremented by
one every row, so it seems possible that it could wrap around for
very large results sets and/or boxes with a low representation of 'int'.
There may be some other safeguards in place I did not see to prevent this,
but I don't see a reason why we shouldn't use unsigned int or
unsigned long int here, both for ntups and the return value of the
function.
- --
Greg Sabino Mullane gr...@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200707300937
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFGrfPXvJuQZxSWSsgRA6gZAJ9O5dkgEIstoqhcYjz87V2REUhLWQCgr+uW
1eIVpiahum4ML0Zz7ANlrl0=
=YqJu
-----END PGP SIGNATURE-----
I think we need more use cases before we break the API on this one.
--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
On second thought, I have at least updated the function documentation:
Returns the number of rows (tuples) in the query result. Because
it returns an integer result, large result sets might overflow the
return value on 32-bit operating systems.
--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
---------------------------(end of broadcast)---------------------------
> On second thought, I have at least updated the function documentation:
> Returns the number of rows (tuples) in the query result. Because
> it returns an integer result, large result sets might overflow the
> return value on 32-bit operating systems.
This is silly. Have you forgotten that the max number of columns is
constrained to 1600 on the backend side?
regards, tom lane
Uh, this is the number of returned rows, right? How does this relate to
columns?
--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
> Uh, this is the number of returned rows, right? How does this relate to
> columns?
Duh, brain fade on my part, sorry. Still, I suspect the return type of
PQntuples would be the very least of the changes we'd need to make to
support resultsets > 2G rows. And I would not advise changing it to an
unsigned type, since that could cause hard-to-find breakage in
comparison logic in applications.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster
Uh, yea. Not sure if anyone has ever tried. At least we have a marker
in the docs now that it might be a problem. ;-)
--
Bruce Momjian <br...@momjian.us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
---------------------------(end of broadcast)---------------------------