me='fred' and domain=t1.domain);
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
CE((SELECT username FROM users WHERE username='fred'
and domain=t1.domain), username);
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
ABLE, something like this:
CREATE OR REPLACE FUNCTION feat_group(INTEGER) RETURNS INTEGER[] AS $$
SELECT ARRAY(SELECT DISTINCT feat_id FROM linktest WHERE link_id=$1
ORDER BY feat_id);
$$ LANGUAGE sql STABLE;
SELECT
feat_group(link_id),
SUM(other)
FROM linktext t1
GROUP BY
, 26910), 4326) AS foo,
sightings.title
FROM sightings
WHERE sighting_id = 25) bar;
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 6: explain analyze is your friend
?
Is there some trick?
You must cast the integer column to a float or numeric, try:
SELECT 9 + 999::numeric/10 + 999::numeric/100;
In your case:
CHECK ("P_RETAILPRICE" = (9 + "P_PARTKEY"::numeric / 10 +
"P_PARTKEY"::numeric / 100)
address of the remote
connection.
Sincerely,
Niklas Johansson
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
rity may exist?
An obvious source of ambiguity is the date comparison:
tb1.field5 BETWEEN '03/07/2006' AND '03/08/2006'
Is that interval a day or a month (mm/dd/ or dd/mm/)? Check
your datestyle setting and make sure all systems interpret the date
correctly (or a
his will also give you a slightly better plan in most
cases.
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org
p by minute, you can try
GROUP BY date_trunc('minute', quando)
or even
GROUP BY EXTRACT(EPOCH FROM quando)::integer / 60
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster
On 21 dec 2007, at 12.16, Leif B. Kristensen wrote:
I've got a similar problem. My persons table has a number of fields
for
different name parts: given, patronym, toponym, surname, occupation,
epithet.
I'd like something more elegant, like the
Python or PHP join() function. I tried Andreas'
he operands. Numeric
scale is not the equivalent of character string length.
What is the actual problem you're trying to solve?
Sincerely,
Niklas Johansson
---(end of broadcast)---
TIP 7: You can help support the PostgreSQL project by donatin
table in both cases, just do:
SELECT * FROM mytable WHERE condition1 AND NOT condition2
Otherwise, use EXCEPT:
SELECT * FROM mytable1 WHERE condition1
EXCEPT
SELECT * FROM mytable2 WHERE condition2
in which case both queries must return the same type of rows.
Sincerely,
Niklas Johansson
ERE m2.group_nr=m1.group_nr AND fk <> 0));
Sincerely,
Niklas Johansson
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
'P');
The optimal execution plan will be dependent on the size and
distribution of your data, so you should test the queries with real
data.
Sincerely,
Niklas Johansson
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
14 matches
Mail list logo