Обсуждение: Postgres 8.4 view keys

Поиск
Список
Период
Сортировка

Postgres 8.4 view keys

От
richard terry
Дата:
I wondered if postges could some how auto-generate a unique view key?

I tried searching the on-line docs to no avail.

Any help appreciated.

Richard

Re: Postgres 8.4 view keys

От
"A. Kretschmer"
Дата:
In response to richard terry :
> I wondered if postges could some how auto-generate a unique view key?

What do you mean with a 'unique view key'?

I'm not sure, but maybe you are searching for SERIAL (a datatype)


Regards, Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

Re: Postgres 8.4 view keys

От
Thomas Kellerer
Дата:
A. Kretschmer, 12.04.2010 13:52:
> In response to richard terry :
>> I wondered if postges could some how auto-generate a unique view key?
>
> What do you mean with a 'unique view key'?
>
> I'm not sure, but maybe you are searching for SERIAL (a datatype)

Or row_number()

Thomas


Re: Postgres 8.4 view keys

От
"A. Kretschmer"
Дата:
In response to Thomas Kellerer :
> A. Kretschmer, 12.04.2010 13:52:
> >In response to richard terry :
> >>I wondered if postges could some how auto-generate a unique view key?
> >
> >What do you mean with a 'unique view key'?
> >
> >I'm not sure, but maybe you are searching for SERIAL (a datatype)
>
> Or row_number()

Hey, maybe you are right ;-)

But row_number() isn't always unique: only if it works over the whole
result set and not over multiple windows.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

Re: Postgres 8.4 view keys

От
Syan Tan
Дата:
Is the view generating duplicate rows ? Can the query be expressed like
select A.a,A.b,A.c, B.a, B.b, B.c from A, B where A.c = B.c and A.c = x , B.b is between y and z
to get an idea of what is meant ?

On Mon 12/04/10 11:32 , "richard terry" rterry@pacific.net.au sent:
> I wondered if postges could some how auto-generate a unique view key?
>
> I tried searching the on-line docs to no avail.
>
> Any help appreciated.
>
> Richard
>
> --
> Sent via pgsql-novice mailing list (p
> gsql-novice@postgresql.org)To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>
>