Hi,
I have a question how to get number of rows effected in last DML in
Postgres.
actually i am using procedures for each DML so when a update procedure is
called i have to return no of rows effected by it.
Thanks
Pankaj Chugh
This email may contain confidential or privileged information for the
in
On Mon, 14 Jun 2004, Jie Liang wrote:
> I have a question about performance, in SQL commands: there is a
> prepare/execute command, document says it will improve the performance
> while repeatly execute a statement. In java.sql: there is a
> PreparedStatement object, which can store precompiled
Not sure what am I missing. I really appreciate if anyone could point it out
to me.
I've a logs table that has both sign-in and sign-out records which are
differentiated by action flag. Records with action flag = (1,2) => sign-in
records and action flag = (3,4,5,6,7) => sign-out records.
playfiel
Hello,
I have a table with measurement values and columns like this:
analyses(id, sample_id, parameter[temperatur...], value, unit[°C...], error)
With PL/PgSQL at the end I want try to perform a pivot-like arrangement of
these data:
sample_id|Temperature [°C]|pa
Hi,
I have objects in my database, and they have an object id generated with
a sequence. Then I have object versions. The ids of object versions need
to be unique only within one object id. But for simplicity they're
generated with a sequence, too.
Now I want to reference an object version. I can
Torsten Lange wrote:
Hello,
I have a table with measurement values and columns like this:
analyses(id, sample_id, parameter[temperatur...], value, unit[?C...], error)
With PL/PgSQL at the end I want try to perform a pivot-like arrangement of
these data:
sample_i
Hello.
I'd appreciate any help with a function I'm writing.
I have a simple table like this:
CREATE TABLE websites (
id BIGSERIAL not null primary key,
domain character varying(256) NOT NULL,
last_fetch timestamp without time zone DEFAULT 'now()',
crawl_status smallint not null DEFAULT 1
);
and m
Andrei Bintintan wrote:
"Is it safe to use "select max(table1_id) from table1" after the insert?"
Yes it is safe, but ONLY if you use it inside a transaction.(BEGIN/COMMIT).
BR.
Hi,
I think it would be safe to use :
select currval('tablename_idname_seq');
inside a session to receive the current va
Hannes,
> does anyone know how it is posible to set a composite type as the data
> type of a column when creating a new table?
This is not yet supported. Hopefully it will be supported in the upcoming
version 7.5.
--
Josh Berkus
Aglio Database Solutions
San Francisco
---
On Wed, 16 Jun 2004, Jie Liang wrote:
> Kris,
> Thank you for your valuable response, I used the code you list
> following:
>
> [7.5 code example]
>
> Then, the compiler complaint:
> ServerSidePreparedStatement.java:20: cannot resolve symbol symbol :
> method setPrepareThreshold (int)
> locati
On Wed, 16 Jun 2004, ctrl wrote:
> CREATE OR REPLACE FUNCTION getNextWebsiteForCrawl(integer) RETURNS
> website AS '
> DECLARE
> my_record RECORD;
> w website%rowtype;
> count smallint;
You can't safely use a variable named count and the count(*) expression
below I think, so you'll want to rename
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kirs,
>
> I re-compile with setUseServerPrepare(true), it works fine, thanks.
> However, reading from my log file, what I saw is that five same SELECTs
> with different argument, so I am wondering that the PrepareStatement
> really save time than individu
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kris,
> I have another question, I saw some discussion regarding
> PreparedStatement work with array argument, I get a error when I try to
> play with it.
> E.g.
> I have myfunction(int[]),
> So,
> PrepareStatement st = conn.prepareStatment("SELECT myfunc
Markus,
> I have objects in my database, and they have an object id generated with
> a sequence. Then I have object versions. The ids of object versions need
> to be unique only within one object id. But for simplicity they're
> generated with a sequence, too.
>
> Now I want to reference an object
On Thu, 17 Jun 2004, Jie Liang wrote:
> Kris,
> You are right, I modified that piece of code a little bit,
> CallableStatement stmt = conn.prepareCall("{?=call chr(?)}");
> Then my log file were:
> Select * from chr(65) as result;
> Select * from chr(66) as result;
> ..
> However, if I use:
On Thu, 17 Jun 2004, Jie Liang wrote:
> Hmm, intersting.
> I am using jdk 1.3.1, and pg74.213.jdbc2.jar driver, I hope this bug
> could be fixed in later version.
>
I suppose, but I'm going to put it pretty close to the bottom of my todo
list because it still works even though it doesn't use
On Fri, 18 Jun 2004, Jie Liang wrote:
> However, I am still thinking if I call one SELECT and one DELECT and one
> UPDATE and one INSERT a thousand times against same table with different
> arguments, should I consider performance iusse?
Right, this is a case where some benefits can be found, b
On Fri, 18 Jun 2004, Jie Liang wrote:
> So, I think that PreparedStatement should have a way at least case a
> String to an Array or a way to create a Array, because of
> conn.prepareStatement("SELECT myfunction('{1,2,3}')") is NOT very
> useful.
Right, this is a known issue. It's on the list.
Hi all,
I am a new joinee to this mailing list. I am using PostgreSql for my
project. We are trying to port a few stored procedures written in SQL to
PGSQL. But i am finding difficulties in doing that. I m new to
Postgresqldont know much about it. I tried a lot of books and online
documents..
[Sorry if this is a double post.]
Hello all,
[Postgresql 7.4.2]
CREATE TABLE "story" (
"id" int4 NOT NULL,
"title" varchar (100) NOT NULL,
"body" text NOT NULL,
"entryDate" timestamptz NOT NULL,
CONSTRAINT "story_pkey" PRIMARY KEY (id)
);
In the above table why does the query:
UPDATE "story"
S
20 matches
Mail list logo