stuck on values in 8.2

Поиск
Список
Период
Сортировка
От Tom Allison
Тема stuck on values in 8.2
Дата
Msg-id 72D75E4D-21E3-4FD6-9A62-561C6A2C2C9A@tacocat.net
обсуждение исходный текст
Ответы Re: stuck on values in 8.2  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-general
OK, after reviewing many emails and what I was trying to do I
upgraded from 8.2.

Seems to work as it did in 8.1 which is a good start.

I'm doing all of this so I can use the 'values'  that was described
as being something like:

select * from (values ('one','two','three')) "foo";

But instead of getting three rows of one value each, I get three
columns of one row.
Not what I was looking for. :(

What I am doing now is run a large list (300+) of values that is
being iterated through a sql statement like:  'select * from mytable
where token = ?' to see if the value exists or not and then "do stuff".

A while back I was told that this would all be fixed if I used values
(...)

Did I misunderstand the proper care and feeding of the VALUES
statement or is there something else I need to do here?

I initially thought that I could do this with:
select t.value, v.value from
values('one','two','three') left outer join mytable using (value)

except
-- not sure how to name the column in values() to come out as name
"value"
-- and quite frankly I can't get anything to actually run other than
my first example.

Ideally the output would have something like:
v.value | t.value
----------+---------
one       |
two        |  two
three    |  three

where the value 'one' is not in the table...

Am I still able to do something like this but don't have the syntax
correct?
Or am I more SOL than RTFM?

В списке pgsql-general по дате отправления:

Предыдущее
От: Ray Stell
Дата:
Сообщение: Re: postgres upgrade
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: postgres upgrade