Tarlika Elisabeth Schmitz writes:
> The following command works fine when pasing it to psql via the -c
> option:
> cat event.csv | \
> psql -c "COPY (event_id, event_name) FROM STDIN DELIMITER AS ',' NULL
> AS ''"
> When executed from a file via -f, it does nothing (no error messages
> either):
On 11/12/2010 02:03 PM, Tarlika Elisabeth Schmitz wrote:
The following command works fine when pasing it to psql via the -c
option:
cat event.csv | \
psql -c "COPY (event_id, event_name) FROM STDIN DELIMITER AS ',' NULL
AS ''"
When executed from a file via -f, it does nothing (no error message
The following command works fine when pasing it to psql via the -c
option:
cat event.csv | \
psql -c "COPY (event_id, event_name) FROM STDIN DELIMITER AS ',' NULL
AS ''"
When executed from a file via -f, it does nothing (no error messages
either):
event.sql:
COPY (event_id, event_name) FROM STD
Thank you all for your suggestions. I will try each of these and see
which one fits my situation best.
From: pgsql-sql-ow...@postgresql.org
[mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Andreas Gaab
Sent: Friday, November 12, 2010 12:23 AM
To: Ozer, Pam; pgsql-sql@postgresql.org
Subject:
On Wed, Nov 10, 2010 at 12:28:46PM -0800, Bryce Nesbitt wrote:
> I have a cluster with log_min_duration_statement set to log slow
> queries. Presently what I'm tracking down is almost certainly a lock
> problem. Is there any analog of log_min_duration_statement for locks?
> If there is a lo
or:
Select Groups, generate_series
FROM
ranges JOIN generate_series(10,50,10) on ( ColumnA < generate_series)
ORDER by Groups , generate_series
;
regards,
Marc Mamin
From: pgsql-sql-ow...@postgresql.org
[mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Andreas Gaa
Hi,
the following works:
Create temp table ranges (Groups int, ColumnA int);
Insert into ranges Values(2,45);
Insert into ranges Values(3,15);
Insert into ranges Values(4,25);
Insert into ranges Values(5,35);
Select Groups,
Case when ColumnA between 0 and 19 then 0
when ColumnA >=20 AND Col