counting columns - Mailing list pgsql-general

From pere roca
Subject counting columns
Date
Msg-id 12368870.post@talk.nabble.com
Whole thread Raw
Responses Re: counting columns  (Ron Johnson <ron.l.johnson@cox.net>)
List pgsql-general

hi!

I want different users to insert data and perform different analysis which
will be inserted in an interactively created new column. The name of this
new column should follow a logic name such as: fxanalysis_1 for the first
user that perform the analysis called fx, fxanalysis_2 for the second...
To get it, I think I should construct a function that counts how many
columns have their name starting with fxanalysis.
   If count >=1, then alter table adding a new column with name fxanalysis_2
   and so on...
   One of the questions: how to COUNT COLUMNS? I can rename, add, alter
columns... but count?

Thanks in advance,
Pere
--
View this message in context: http://www.nabble.com/counting-columns-tf4342021.html#a12368870
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: dustov
Date:
Subject: Re: PGError: input out of range
Next
From: mrodriguez@curreyadkins.com
Date:
Subject: how to print a schema