On Jun 15, 2006, at 11:49 AM, chester c young wrote:
in PHP for example, where there are multiple sessions and which you
get is random:
how do you know if the session you're in has prepared a particular
statement?
and/or how do you get a list of prepared statements?
last, is there any a
On Fri, 2006-06-16 at 08:27 -0400, John DeSoi wrote:
> On Jun 15, 2006, at 11:49 AM, chester c young wrote:
>
> > in PHP for example, where there are multiple sessions and which you
> > get is random:
> >
> > how do you know if the session you're in has prepared a particular
> > statement?
> >
On Fri, Jun 16, 2006 at 08:55:16AM -0400, Rod Taylor wrote:
> BEGIN;
> SAVEPOINT;
> SELECT * FROM temporary_prepared_statement;
> ROLLBACK TO SAVEPOINT < on failure>;
> CREATE TEMPORARY TABLE temporary_prepared_statement ...;
> COMMIT;
>
> Now you have a place to store and retrieve prepared connec
Aaron Bono wrote:
Each of your queries has the filter xxx >= $dt where the xxx is the
first column in each select. You could simplify the query by turning
the unioned selects into a sub-query and then putting the $dt filter in
the outer query.
It would probably have to be two subqueries unle
Dear all, I tried the lock table option today. yes it works fine when saving simultaneously. but after two or three times even when all of us close our application, the lock exists there in the database. when we run the select query from other db tool it hangs up.
our code looks like
I would use a BIGSERIAL for the ID. It simplifies your inserts, you don't have to mess with any locking and the sequence is maintained for you outside your transaction so two transactions can do inserts without stepping on each other.
This is how I handle auto generated numbers.The only downside i
> AFAIK PostgreSQL does not support materialized views but it's
> interesting that you mention that because in essence the query is used
> to materialize a view, i.e., it's part of an INSERT / SELECT into a
> table which is then joined back to the other tables to construct a web
> page as well
>INSERT INTO rcp_patient_visit_monitor (
>entry_no, patient_id, visit_date,
> is_newpatient,
> visit_type, is_medical,
>is_review, is_labtest, is_scan,
> is_scopy, is_xray,
> weight, height)
>VALUES ((SELECT
> coalesce(max(entry_no)+1, 1
Richard Broersma Jr <[EMAIL PROTECTED]> writes:
> http://jonathangardner.net/PostgreSQL/materialized_views/matviews.html
> However, I am not sure if this link shows how postgresql supports
> materialized views or if it just shows how to simulate a materialized
> view with procedural code.
The lat
If you are using pooled connections, doesn't PostgreSQL manage the prepared statements for you? I would expect that, once I prepare a statement, if I attempt to do it again, PostgreSQL would say, "righty then, already done it, here you go". Then again, I don't know what PostgreSQL does under the
I know this is a Java issue but I would recommend something more like:
Statement stmt = con.createStatement(); try { stmt.execute("begin"); stmt.execute("lock table rcp_patient_visit_monitor"); psSave.executeUpdate(); //psSave is a prepared statement
stmt.execute("
Thank you Tom Lane and Phillip Smith, you've answered my questions.
--Geoff
On Jun 15, 2006, at 22:46, Tom Lane wrote:
Geoffrey Knauth <[EMAIL PROTECTED]> writes:
Andrew Sullivan wrote:
Well, do you actually have an interface with that address?
I think I do, in that the machine's wirele
I haven't stared at your query as long as you have so I may have missed something but it looks like in all the selects you are combining the first column in the select is the column you filter on. So the the outer query doesn't have to know wiether it is a new or changed row:
SELECT * FROM ( S
Aaron Bono wrote:
I haven't stared at your query as long as you have so I may have missed
something but it looks like in all the selects you are combining the
first column in the select is the column you filter on. So the the
outer query doesn't have to know wiether it is a new or changed row:
"Aaron Bono" <[EMAIL PROTECTED]> writes:
> I haven't stared at your query as long as you have so I may have missed
> something
Likewise I'm perhaps speaking too quickly, but at the risk of making a fool of
myself: you should perhaps realize that UNION has to do a fair amount of work
to eliminate
in PHP for example, where there are multiple sessions and which you get
is random:
how do you know if the session you're in has prepared a particular
statement?
and/or how do you get a list of prepared statements?
last, is there any after login trigger that one could use to prepare
st
I need to write a function which inserts a log entry in a log table and only
keeps the last 30 records. I was thinking of using a subquery similar to the
following:
insert into log (account_id, message) values (1, 'this is a test);
delete from log where account_id = 1 and id not in ( select id
Dear group
Its my mistake that i did not reveal the whole scenario. Actually within that begin and commit, i insert in 10 tables. The above said table is the key table. I fetch the consultatioin_no and add one to it, i should know this consultation_no to save the other 10 tables. because
18 matches
Mail list logo