pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedcreatng a new interface to postgresql, how do I update a field with a particular oid?
2+ messages / 2 participants
[nested] [flat]
* creatng a new interface to postgresql, how do I update a field with a particular oid?
@ 1998-08-03 01:52 Mark Nielsen <psql@www.tcu-inc.com>
1998-08-03 15:03 ` Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid? Hannu Krosing <hannu@trust.ee>
0 siblings, 1 reply; 2+ messages in thread
From: Mark Nielsen @ 1998-08-03 01:52 UTC (permalink / raw)
To: pgsql-interfaces
Hello!
I think this might be a better place to post messages than the hackers
mailing list. I didn't catch this one the first time.
Anyways, I don't know if a web version currently exists, but I have gotten
a web interface to at least be able to view data from tables. Now I want
to update data.
If people are interested in what I am doing and would like to help out,
I am using ePerl, apache, and Javascript and you can e-mail me at
psql@tcu-inc.com
Anyways, my question is, I want to update specific rows according to their
oids. Oh, I am also using the perl module Pg. I can find out the oid of
the data retrieved, but I want to update data according to their oid.
Is there any easy way to do this using the moduel Pg or a select
statement? I couldn't find anything with the select statement and was
hoping Pg had something in it, but I couldn't find anything in it as well.
Thanks!
Mark
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] creatng a new interface to postgresql, how do I update a field with a particular oid?
1998-08-03 01:52 creatng a new interface to postgresql, how do I update a field with a particular oid? Mark Nielsen <psql@www.tcu-inc.com>
@ 1998-08-03 15:03 ` Hannu Krosing <hannu@trust.ee>
0 siblings, 0 replies; 2+ messages in thread
From: Hannu Krosing @ 1998-08-03 15:03 UTC (permalink / raw)
To: Mark Nielsen <psql@www.tcu-inc.com>; +Cc: pgsql-interfaces
Mark Nielsen wrote:
>
> Hello!
>
>
> Anyways, my question is, I want to update specific rows according to their
> oids. Oh, I am also using the perl module Pg. I can find out the oid of
> the data retrieved, but I want to update data according to their oid.
update my_table
set
field1 = value1,
field2 = value2
where
oid = my_oid
;
to make it faster you can create an index on the oid column.
It used to require a cast for pg to use the index, i.e.
where oid = const_oid::oid
but I don't know if it is still the case.
postgresql does not yet have a "select for update" syntax or
mechanics implemented.
----------
Hannu
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1998-08-03 15:03 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-08-03 01:52 creatng a new interface to postgresql, how do I update a field with a particular oid? Mark Nielsen <psql@www.tcu-inc.com>
1998-08-03 15:03 ` Hannu Krosing <hannu@trust.ee>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox