[EMAIL PROTECTED] wrote:
Hello,
I've got 2 tables, url (U), and bookmark (B), with bookmark pointing to
url via FK.
Somehow I ended up with some rows in B referencing non-existent rows in U.
This sounds super strange and dangerous to me, and it's not clear to me how/why
PG let this happen.
Dear users,
I'm working on a Postgres 7.4 server
I have a .txt file, containing some tabular data, where data are
delimited by TABs.
there are 3 columns:
column1 int4, column2 float8, column3 float8
the problem is that column3 contains also null values (i.e. sometimes is
empty)
so when I try
O ivan marchesini έγραψε στις Mar 22, 2006 :
Dear users,
I'm working on a Postgres 7.4 server
I have a .txt file, containing some tabular data, where data are
delimited by TABs.
there are 3 columns:
column1 int4, column2 float8, column3 float8
the problem is that column3 contains
On 3/22/06, Achilleus Mantzios [EMAIL PROTECTED] wrote:
O ivan marchesini έγραψε στις Mar 22, 2006 : Dear users, I'm working on a Postgres 7.4
server I have a .txt file, containing some tabular data, where data are delimited by TABs. there are 3 columns: column1 int4, column2 float8, column3
That worked perfectly - thanks!
CREATE OR REPLACE FUNCTION Testing(TrailingWeeks int) RETURNS date AS $$
BEGIN
RETURN current_date - (TrailingWeeks || ' weeks')::INTERVAL;
END;
$$ LANGUAGE plpgsql;
select * from testing(1);
-Original Message-
From: [EMAIL PROTECTED]
ivan marchesini [EMAIL PROTECTED] writes:
I have a .txt file, containing some tabular data, where data are
delimited by TABs.
there are 3 columns:
column1 int4, column2 float8, column3 float8
the problem is that column3 contains also null values (i.e. sometimes is
empty)
This should work,
Hello pgsql-sql,
I have postgresql 8.1.3 and database with about 2,7GB (90% large
objects).
When I execute this query postgresql calculate this 2min 50sec. How
can I optimize this query?
select towar.id_towar,towar.key2,towar.nazwa,0 as min,0 as
Send an EXPLAIN ANALYZE of the query along with the description of the
involved tables. Also hardware information (RAM, disks, CPU), what
other applications are running on that box and the parameter values in
postgresql.conf that you changed from the defaults would be
interesting.
Markus
Hello Markus,
Wednesday, March 22, 2006, 6:58:44 PM, you wrote:
MB Send an EXPLAIN ANALYZE of the query along with the description of the
MB involved tables. Also hardware information (RAM, disks, CPU), what
MB other applications are running on that box and the parameter values in
MB
That's an explain. We need explain analyze.
2006/3/23, Maciej Piekielniak [EMAIL PROTECTED]:
Hello Markus,
Wednesday, March 22, 2006, 6:58:44 PM, you wrote:
MB Send an EXPLAIN ANALYZE of the query along with the description of the
MB involved tables. Also hardware information (RAM, disks,
In the meantime, try this:
SELECT
towar.id_towar,
towar.key2,
towar.nazwa,
0 AS min,
0 AS max,
towar.ilosc_jed,
towar.ilosc_nom,
towar.ilosc_paczkowa,
dostawcy.id_dostawcy,
jednostka_miary.jednostka,
0.0 AS
Hello Markus,
Wednesday, March 22, 2006, 7:32:11 PM, you wrote:
MB foo.z_zamowien,
MB ) AS foo ON (foo.id_towar = towar.id_towar)
foo?
--
Best regards,
Maciejmailto:[EMAIL PROTECTED]
---(end of
Hello Markus,
ERROR: column foo.z_zamowien must appear in the GROUP BY clause or be used
in an aggregate function
--
Best regards,
Maciejmailto:[EMAIL PROTECTED]
---(end of broadcast)---
TIP 5: don't forget to
Hello Markus,
Sorry, I try this:
SELECT
towar.id_towar,
towar.key2,
towar.nazwa,
0 AS min,
0 AS max,
towar.ilosc_jed,
towar.ilosc_nom,
towar.ilosc_paczkowa,
dostawcy.id_dostawcy,
jednostka_miary.jednostka,
0.0
Maciej Piekielniak wrote:
Hello Markus,
Oryginal query return 7881 rows , your query only 729 rows.
But it's faster!
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if
Title: Function Parameters in GROUP BY clause cause errors
When I use a parameter in a query which aggregates it fails with a GROUP BY error. What syntax can I use to avoid this error?
CREATE TABLE test (email_creation_datetime timestamp);
INSERT INTO test VALUES ('2006-03-20 09:00');
Hi,
How can I enter description for my custom types?
\dT provides information such as schema, name, and description for all
the registered types and custom types. I would like to provide a
description for each custom type I create.
Thanks,
--
Daniel CAUNE
Ubisoft Online Technology
(514) 4090
On Wednesday 22 March 2006 03:25 pm, Daniel Caune saith:
Hi,
How can I enter description for my custom types?
\dT provides information such as schema, name, and description for all
the registered types and custom types. I would like to provide a
description for each custom type I create.
Terry Lee Tucker wrote:
rnd=# \h comment
Command: COMMENT
Description: define or change the comment of an object
..I believe this is what you need.
Cool!
That's a great feature. Though it would be even nicer if the comment
showed when
you \d a table::
stage=# comment on table
Hi,
How can I enter description for my custom types?
\dT provides information such as schema, name, and description for
all
the registered types and custom types. I would like to provide a
description for each custom type I create.
Thanks,
--
Daniel CAUNE
Ubisoft
Davidson, Robert [EMAIL PROTECTED] writes:
ERROR: column em.email_creation_datetime must appear in the GROUP BY =
clause or be used in an aggregate function
CONTEXT: SQL statement select to_char(to_timestamp(EXTRACT(HOUR FROM =
em.email_creation_datetime) || ':' || (EXTRACT(MINUTE FROM =
Hi,
Is there any suggestion against using OUT parameter for local
calculation such as using a local variable?
CREATE OR REPLACE FUNCTION foo(a IN int,
b1 OUT int,
b2 OUT int)
AS $$
BEGIN
FOR (...) LOOP
b1 = (...);
b2 =
Daniel Caune wrote:
Is there any suggestion against using OUT parameter for local
calculation such as using a local variable?
CREATE OR REPLACE FUNCTION foo(a IN int,
b1 OUT int,
b2 OUT int)
AS $$
BEGIN
FOR (...) LOOP
Title: Function Parameters in GROUP BY clause cause errors
Just Put aggregate function to the fields
you selected.
Like this:
select
to_char(to_timestamp(EXTRACT(HOUR FROM max(em.email_creation_datetime))
|| ':' || (EXTRACT(MINUTE FROM max(em.email_creation_datetime))::integer/30)
*
Daniel Caune wrote:
Is there any suggestion against using OUT parameter for local
calculation such as using a local variable?
In plpgsql (at least in the current implementation) an OUT parameter is
pretty much just a local variable, and so there's no efficiency argument
against using it as a
I wrote:
Hmm, this seems like a plpgsql deficiency. It feels it can generate a
separate parameter symbol ($n) for each occurrence of each variable it
passes into a SQL query. But for this query to be legal, the two
instances of IntervalMinutes have to be represented by the *same*
parameter
26 matches
Mail list logo