Re: [SQL] Insert strings that contain colons into a table

2012-10-19 Thread lmagnell
Thank you, that is the problem. That column should not have been created as an ARRAY type. Lance From: David Johnston [via PostgreSQL] [mailto:ml-node+s1045698n5729107...@n5.nabble.com] Sent: Friday, October 19, 2012 4:36 PM To: Lance Magnell Subject: Re: Insert strings that contain colons in

Re: [SQL] Insert strings that contain colons into a table

2012-10-19 Thread David Johnston
> -Original Message- > From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of lmagnell > Sent: Friday, October 19, 2012 4:25 PM > To: pgsql-sql@postgresql.org > Subject: [SQL] Insert strings that contain colons into a table > > How can I insert multipl

[SQL] Insert strings that contain colons into a table

2012-10-19 Thread lmagnell
How can I insert multiple strings into a table where the strings contain colons. This case fails: INSERT INTO wwn (wwn_start,wwn_end) VALUES ('50:06:0B:00:00:C2:86:80','50:06:0B:00:00:C2:86:83'); ERROR: array value must start with "{" or dimension information at character 71 LINE 1: ..._start,

Re: [SQL] Trigger triggered from a foreign key

2012-10-19 Thread David Johnston
> -Original Message- > From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql- > ow...@postgresql.org] On Behalf Of Victor Sterpu > Sent: Friday, October 19, 2012 2:15 PM > To: pgsql-sql@postgresql.org > Subject: [SQL] Trigger triggered from a foreign key > > I have this trigger that works

[SQL] Trigger triggered from a foreign key

2012-10-19 Thread Victor Sterpu
I have this trigger that works fine. The trigger prevents the deletion of the last record. But I want skip this trigger execution when the delete is done from a external key. How can I do this? This is the fk ALTER TABLE focgdepartment ADD CONSTRAINT fk_focgdep_idfocg FOREIGN KEY (idfocg)

Re: [SQL] Recursive temporal query

2012-10-19 Thread Liam Caffrey
With source data... On 19 October 2012 16:40, Liam Caffrey wrote: > Hi, > > I am trying to run a recursive cte query on temporal data. > I attach the starting set (temp_station) and the solution set > (temp_solution) > > A user visits many stations in random order. > They can enter a station man

Re: [SQL] Recursive temporal query

2012-10-19 Thread Liam Caffrey
Hi, I am trying to run a recursive cte query on temporal data. I attach the starting set (temp_station) and the solution set (temp_solution) A user visits many stations in random order. They can enter a station many times but they only exit once. After they enter a station X, they can enter other