* Tom Lane <[EMAIL PROTECTED]> [02-10-01 18:02]:
> Stephan Szabo <[EMAIL PROTECTED]> writes:
> > I think you could use EXISTS for that,
> > select EXISTS (); should give a true/false on whether the
> > query returned any rows. I'm not sure if it stops after one row
> > or not, but if it doesn't
Esteban,
Try http://jdbc.postgresql.org
thanks,
--Barry
PS. There is a pgsql-jdbc mail list which would be a more appropriate
place for this question.
Esteban Gutierrez Abarzua wrote:
> hi.
>
> who to knows about the java + postgresql (jdbc)?
>
> I need to know where can I get the
hi.
who to knows about the java + postgresql (jdbc)?
I need to know where can I get the driver for conection postgres and
java 1.2?
thanks.
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropr
Stephan Szabo <[EMAIL PROTECTED]> writes:
> I think you could use EXISTS for that,
> select EXISTS (); should give a true/false on whether the
> query returned any rows. I'm not sure if it stops after one row
> or not, but if it doesn't you can add a limit 1 to the query.
Yes it does stop after
<<< No Message Collected >>>
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly
On Tue, 2 Oct 2001, Kevin Way wrote:
> I'm currently using a SELECT count(*) when all I really want to know is
> if 1 or more records exist. Is there a standard way to just find out if
> a record exists? If not, is there a way to avoid iterating over all the
> records by writing an aggregate fu
Folks,
Q: Are brand-new rows included in PostgreSQL indexed immediately?
Detail: I have several "keyset holding" tables where lists of primary
key ids are inserted for immediate retrieval by the user. After a few
retrievals, these keysets are not used again. The purpose of this
arrangement is
On Tue, 2 Oct 2001, [euc-kr] Jeong Jaeick, Á¤ÀçÀÍ wrote:
> select * from pgsql_bbs where topic = 'qna' and deleted < 2
>order by gid desc, pos asc limit 20, 0;
>
> But this query is not using index!
>
> The next is result of explain of this query:
>
> dsn=# explain select * from pgsq
I'm currently using a SELECT count(*) when all I really want to know is
if 1 or more records exist. Is there a standard way to just find out if
a record exists? If not, is there a way to avoid iterating over all the
records by writing an aggregate function? Given what I've read of how
they work
bpalmer <[EMAIL PROTECTED]> writes:
> - I have a query:
> SELECT stamp
> FROM table
> WHERE
> timestamp > now() - INTERVAL '1 0:00'
> This query takes 13 seconds to run.
It's probably not being indexed (use EXPLAIN to check). The problem
is that "now() - INTERVAL '1 0:00'" is not considered a
Markus Bertheau <[EMAIL PROTECTED]> writes:
> r_kunden_anbieter describes the relationship between customers and
> suppliers. there are five status, 0 to 4 in attribute beziehung. both
> queries return the same results. they select all customers which have a
> certain relationship (beziehung = 3)
Rebekah Kirk wrote:
>
> I want to create a table and for whatever reason it will not accept the
> command, can anyone say what is wrong as I am very new to Postgres, thanks:
>
> CREATE TABLE cmpnycontacts (
> ContactNo integer(10) NOT NULL SERIAL,
> CmpnyNo varchar(6) NOT NULL,
> FirstName v
Indeed I do. I need to add another constraint on that query. It
never would have occurred to me had I not asked. Problem solved. Thank
you, thank you!
-Robin
On Thu, 27 Sep 2001, Tom Lane wrote:
> "Robin's PG-SQL List" <[EMAIL PROTECTED]> writes:
> > I have a query using the SUM() function
Yes, you are right. The error was, that i saved long text as part of a
prepared statement by using the ascii-stream. Yesterday i recognized (at
least), that i can save without any problem long text as part of a normal
insert-string. And then the queries are working like they should.
Sometimes eve
Joel Mc Graw <[EMAIL PROTECTED]> writes:
> A query such as "select sum(pages) from job_documents where
> delivery_type='print'" returned 0 in version 7.0.3 if there were no rows
> matching the query. In 7.1.3 the result is NULL if no rows match the
> query. Why the change? Which result is "corr
[EMAIL PROTECTED] (Tom Lane) wrote in message news:<[EMAIL PROTECTED]>...
> I think you need "return old", not "return new", in the body of the
> trigger if you want the delete to take place. new would be NULL in
> a delete situation ...
>
> regards, tom lane
>
> -
I made the table like this;
dsn=# \d pgsql_bbs
Table "pgsql_bbs"
Attribute | Type |Modifier
-+-+-
id | integer | not null default nextval('pgsq
Hi guys,
cenes_test=# select version();
version
---
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.95.2
(1 row)
cenes_test=# \d personen
Table "perso
hi
how can i acheive AutoIncrement in postgresql.
please what is the equivalent way of stored procedures in
postgresql.
please mail to below address also.
regards,
sreedhar
mail : [EMAIL PROTECTED]
I want to create a table and for whatever reason it will not accept the
command, can anyone say what is wrong as I am very new to Postgres, thanks:
CREATE TABLE cmpnycontacts (
ContactNo integer(10) NOT NULL SERIAL,
CmpnyNo varchar(6) NOT NULL,
FirstName varchar(30) NOT NULL,
Surname varchar(30)
Two questions:
- Does the order of WHERE clauses make a difference? I was trying to make
some of my code faster and tried switching two clauses that should have
effected the query, but there was no speed difference.
- I have a query:
SELECT stamp
FROM table
WHERE
timestamp > now() - INTERVA
Can I use a function to execute a query and return a row or set of rows? If
so, can you point me to some examples or perhaps give me an example of a
function that would do roughly the same thing as:
select * from mytable where mytable.name ~* 'aname';
I can't seem to find any examples that retur
A query such as "select sum(pages) from job_documents where
delivery_type='print'" returned 0 in version 7.0.3 if there were no rows
matching the query. In 7.1.3 the result is NULL if no rows match the
query. Why the change? Which result is "correct" according to the SQL
standard?
I'm running
23 matches
Mail list logo