Re: Variable column name
От | Bob Pawley |
---|---|
Тема | Re: Variable column name |
Дата | |
Msg-id | 66A47B44AA384A5C8CD9FD4A32F55986@BobPC обсуждение исходный текст |
Ответ на | Re: Variable column name (Bill Moran <wmoran@potentialtech.com>) |
Ответы |
Re: Variable column name
|
Список | pgsql-general |
-----Original Message----- From: Bill Moran Sent: Friday, September 02, 2011 10:53 AM To: Bob Pawley Cc: Postgresql Subject: Re: [GENERAL] Variable column name In response to "Bob Pawley" <rjpawley@shaw.ca>: > > I am getting an error -- "column "1" does not exist" <snip> > Select "1" into column ; Where are you selecting "1" from? This query has no FROM clause, so of course the column doesn't exist. The previous query, "SELECT 2 INTO point_array" is going to put the integer value 2 into the variable point_array, which I'm guessing is not what you want either. Well, actually that is what I am attempting. I added the from clause and that seems to be acceptable for the column identification. What I am trying to accomplish is to collect distance information between numerous geometries (in this case 8) at the first spatial location and build an array in column 1, one array point at a time. Then the loop moves to the next location, establishes the geometries and updates the column 2 array with these distances. It seems to work when I hard code the column name and array point, so I was hoping to make it work through a loop using variables for column and array point. Does this make sense?? Bob
В списке pgsql-general по дате отправления: