Minghann Ho <[EMAIL PROTECTED]> writes:
> The following SELECT are errors?!
No, they're not. PG follows the ISO definition of week numbers:
Monday is the first day of the week, and the first week of a year
is the first one containing a Thursday.
regards, tom lane
---
[EMAIL PROTECTED] (Mark Davies) writes:
> The problem is, the self-join solution is extremely slow. I have a
> SQL Server 7.0 database with a clustered index on TheWord (sequential
> words) and a normal index on TheID.
Kindly do not pester Postgres mailing lists with SQL Server questions.
<[EMAIL PROTECTED]> writes:
> # insert into test_table (test_column) values ( '{ }' );
Try it without the space:
insert into test_table (test_column) values ( '{}' );
regards, tom lane
---(end of broadcast)---
TIP 2: you ca
The following SELECT are errors?!
tpcr=# select extract (week from date '2000-01-01');
date_part
---
52
(1 row)
tpcr=# select extract (week from date '2000-01-02');
date_part
---
52
(1 row)
Please check ...
thanks
Hans
---(end of broadc
Mark,
I doubt very much you will ever get much faster results (without increasing
hardware) in a situation such as that. Your queries don't look selective
enough to effectively use the indexes. What is the query plan for each of
the individual selects and what does it look like as a whole? How
I have a database containing 100 million records, in which each record
contains (in sequence) all of the words in a 100 million word
collection of texts. There are two columns: TheID (offset value) and
TheWord (sequential words), e.g.:
TheID TheWord
-
1 I
2 saw
3 the
4 man
5
Hai everybody,
Hai, Currently, I'm at the work of
converting database from Oracle to Postgresql. I have some
doubts:
1) What is the
equivalent of Oracle ROWNUM in Postgresql? If there is no such equivalent,
can U give me an idea about
that? 2) How
using: psql (PostgreSQL) 7.2.1
why does an empty array return an array of length 1 rather than array of
length 0? one would think that the results below would have returned { }
instead of {0}.
simple test using psql:
# create table test_table ( test_column integer[] );
CREATE
# insert into test
Hi, all.
I'm trying to calculate two count()s.
I have a campaigns table, a campaign_parts table and a people table.
Here is a simplified view of 3 tables I'm trying to use:
create table campaigns {id serial, company_id int, name varchar(20));
create table campaign_parts(id serial, campaign_id
Never mind ... a good night's sleep with my subconscious working on the
problem yielded:
SELECT
reg_type.reg_type_desc "Registration Type",
CASE result.result_defn
WHEN NULL THEN CONVERT(VARCHAR,reg_stats.result_code)
ELSE result.result_defn
END 'Result',
reg_stats.create_date "Create Da
Good time of day!
I have two tables
news(newsid int4, newscltid int4 references clt(cltid) match full,newstext text)
and
clt(cltid int4, somedata text).
after clt is renamed , for ex. to clt_old, newscltid start to reference to
clt_old.cltid.
i'm create new table clt(cltid int4, anotherdata
Is there a way to influence the data type of an index being created?
Some like that would be fine:
CREATE INDEX idx_data2_x ON t_data2(x::int4);
It would be nice to have a workaround for that:
[hs@backup mag]$ time psql -p 5400 test -c "EXPLAIN SELECT * FROM
t_data1 WHERE id > (SELECT AVG(id
Does anybody know how the planner treats casts?
It seems as if casts are not taken into consideration when planning the
query because the costs seem to stay the same.
[hs@backup mag]$ psql -p 5400 test -c "EXPLAIN SELECT id FROM t_data1"
QUERY PLAN
---
I've noticed a lot of the functions that are documented for libpg are also
stored in pg_proc. Are these functions additionally callable from pl/pgsql?
And if so, are they documented for pl/pgsql anywhere, or do we need to make
educated guesses as to the parameters for them under pl/pgsql?
For
14 matches
Mail list logo