Skip site navigation (1) Skip section navigation (2)

creating column content from entry values

From: David Bear <david(dot)bear(at)asu(dot)edu>
To: pgsql-admin(at)postgresql(dot)org
Subject: creating column content from entry values
Date: 2008-02-22 01:55:30
Message-ID: 200802211855.30789.david.bear@asu.edu (view raw or flat)
Thread:
Lists: pgsql-admin
I am too new to this environment to know what to call what I want to do.

Breifly, I want to do an insert where the values for three of the attributes 
are combined via a function and make up the value for the fourth attribute. 
The function may be a simple as a concatenation, or I may want to do other 
things to manipulate the strings that are entered. I think what I want is a 
function that I can call when I do the insert like this

insert into mytable (col1, col2, col3) values ('somestring', 'another 
string' )

but have the insert fix col3 to be whatever it the function computes it to be.

does this make any sense?

 
--
David Bear
College of Public Programs/ASU
411 N Central, Phoenix, AZ 85004

Responses

pgsql-admin by date

Next:From: Tom LaneDate: 2008-02-22 02:17:38
Subject: Re: creating column content from entry values
Previous:From: Lucas SanabioDate: 2008-02-22 00:37:19
Subject: Re: Table was deleted but it still been treated as not

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group