Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
On Thu, 2004-08-12 at 11:09, Oliver Elphick wrote: > On Thu, 2004-08-12 at 16:01, Devin Whalen wrote: > > > zcat cli_postDataInserts.sql.gz | > > >psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1 > > > > Just a few questions about your command. I tried it with one sql > > state

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Oliver Elphick
On Thu, 2004-08-12 at 16:01, Devin Whalen wrote: > > zcat cli_postDataInserts.sql.gz | > >psql -d cli_post -U system --echo-queries -f - >trace.file 2>&1 > > Just a few questions about your command. I tried it with one sql > statement that I know doesn't work and the error went into the right

Re: [SQL] function expression in FROM may not refer to other relations

2004-08-12 Thread Stephan Szabo
On Thu, 12 Aug 2004, Philippe Lang wrote: > > > The problem now is that get_lines is being called twice per line. > > > > Is get_lines() defined as IMMUTABLE? Should it be? > > I have tried defining get_lines as "IMMUTABLE", or "WITH (iscachable)", > but it keeps on getting called twice per line

[SQL] how to cast localtimestamp to bigint???

2004-08-12 Thread Pradeepkumar, Pyatalo (IE10)
Hi, I am having a table something like this CREATE TABLE(PointId integer, PointName varchar(50),PointType integer, createtime bigint); where createtime is the current timestamp when the tuple is inserted. now how do I insert values into the above table. Is there a way to cast timestamp to

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Oliver Elphick
On Thu, 2004-08-12 at 15:20, Devin Whalen wrote: > Hello, > > I am trying to migrate a client from one database to another. Basically > we designed a web application for them using Postgresql but we have made > many changes to the design of our application since version 1. Now they > want to upg

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
On Thu, 2004-08-12 at 10:50, Oliver Elphick wrote: > On Thu, 2004-08-12 at 15:20, Devin Whalen wrote: > > Hello, > > > > I am trying to migrate a client from one database to another. Basically > > we designed a web application for them using Postgresql but we have made > > many changes to the des

Re: [SQL] Sending errors from psql to error file

2004-08-12 Thread Richard Huxton
Devin Whalen wrote: I don't want to have to sit there and watch the import go by, I want to run a command and then look in a file for any errors after the import is complete. I tried this command but it didn't work: gunzip -c cli_postDataInserts.sql.gz | psql cli_post -U system | grep "ERROR:*" >

Re: [SQL] function expression in FROM may not refer to other relations of same query level

2004-08-12 Thread Tom Lane
"Philippe Lang" <[EMAIL PROTECTED]> writes: > I wish there was a way to run the query like this: > select > id, > usr, > code, > CAST(get_lines(code) as lines) > from tbl; You can do something like this: regression=# create type complex as (r float8, i float8); CREATE TYPE regression=# c

[SQL] Sending errors from psql to error file

2004-08-12 Thread Devin Whalen
Hello, I am trying to migrate a client from one database to another. Basically we designed a web application for them using Postgresql but we have made many changes to the design of our application since version 1. Now they want to upgrade. So basically I have to pg_dump their current data and

Re: [SQL] Inserting into point[] type.

2004-08-12 Thread Markus Bertheau
Ð ÐÑÐ, 12.08.2004, Ð 09:58, Theo Galanakis ÐÐÑÐÑ: > How do you insert into a column of type point[] > I have tried without success: > > insert into test (Column_a, Column_b) values > ('Aargau','{47.383896,8.03400039673}') I'd guess '{(3.3, 4.4), (1.0, 4.3)}' or ARRAY[(3.3, 4.4), (1.0, 4.3)]

[SQL] Inserting into point[] type.

2004-08-12 Thread Theo Galanakis
Title: Inserting into point[] type. How do you insert into a column of type point[] Sample table: CREATE TABLE public.test (   Column_a varchar(1000),   Column_b point[] ) WITHOUT OIDS; I have tried without success: insert into test (Column_a, Column_b) values ('Aargau','{47.38389

Re: [SQL] Maybe install debian on your home pc?

2004-08-12 Thread Stef
Erm .. sorry list people. This one slipped to the wrong address... Stef mentioned : => Hi Marcus, => => Here's something interesting for you : => http://www.gnoppix.org/ => => It looks like it may be more easy to install, as it's => entirely geared towards installation rather than just booting.

[SQL] Maybe install debian on your home pc?

2004-08-12 Thread Stef
Hi Marcus, Here's something interesting for you : http://www.gnoppix.org/ It looks like it may be more easy to install, as it's entirely geared towards installation rather than just booting. It says it's based on woody, so I don't know if the 2.6 kernel is a boot option here. Maybe check it out

Re: [SQL] function expression in FROM may not refer to other relations of same query level

2004-08-12 Thread Philippe Lang
> > The problem now is that get_lines is being called twice per line. > > Is get_lines() defined as IMMUTABLE? Should it be? I have tried defining get_lines as "IMMUTABLE", or "WITH (iscachable)", but it keeps on getting called twice per line in the following query... select id, usr, code