To create a Column ina Table with function

From: csanyipal(at)gmail(dot)com
To: pgsql-novice(at)postgresql(dot)org
Subject: To create a Column ina Table with function
Date: 2014-08-20 05:20:30
Message-ID: 8761hnag9t.fsf@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,

I have a table with columns: number, date-range.
I wish to get in this table more columns: week-day-begin, week-day-end.

In the week-day-begin column I wish to get automatically the weekday
name of the first date in the date range.

In the week-day-end column I wish to get automatically the weekday
name of the last date in the date range.

How can I get these two columns by executing a function?
Should this function be a Dynamic Command, or a trigger?

Regards, from Pal

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Albe Laurenz 2014-08-20 06:58:30 Re: To create a Column ina Table with function
Previous Message Marc Richter 2014-08-18 19:08:29 Re: Upgrading from PG 8.2.5 to 9.1.13