Re: Achieving ordered update

Поиск
Список
Период
Сортировка
От Bopolissimus Platypus Jr
Тема Re: Achieving ordered update
Дата
Msg-id f7edef431003281436j3d7b9bc4qc541bc569bb3031e@mail.gmail.com
обсуждение исходный текст
Ответ на Achieving ordered update  (Allan Kamau <kamauallan@gmail.com>)
Список pgsql-general
On Fri, Mar 26, 2010 at 1:02 AM, Allan Kamau <kamauallan@gmail.com> wrote:

> A classic problem. I would like to assign integer values (from a
> sequence) to records in a table based on the order (of contents) of
> other field(s) in the same table.

Do you have a simple example? (create table, insert some data, then show what
the output should look like, or what the data would look like after a
transformation
that would set the integer value from that sequence.

do you mean to set a column in that row with that "integer value (from
a sequence)"?
or will you be filling a column in some other table with that "integer
value..."?

what is the function for determining the integer value based on the input data?

In fact, what is the input data: do you mean "other field(s) in the
same *row*" or
do you really mean "table" in that sentence?

is your function guaranteed to never have collisions (two rows
requiring the same
integer)?  if there are collisions, how do you handle them?

The "problem" isn't specified completely enough for me (probably others too,
although one or two might have a hint if they've solved something
similar already
and so will have enough context to deduce what you mean) to even gain a
mental model of just what you're trying to solve.

tiger

--
Gerald Timothy Quimpo http://bopolissimus.blogspot.com
bopolissimus.lists@gmail.com bopolissimus@gmail.com
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"

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

Предыдущее
От: "Andrus"
Дата:
Сообщение: Re: Splitting text column to multiple rows
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: How many Mandatory Process are there in Postgres