Re: Generic timestamp function for updates where field

From: novnov <novnovice(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Generic timestamp function for updates where field
Date: 2006-12-31 18:31:14
Message-ID: 8108978.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Yes thanks that does make it clear.

Martijn van Oosterhout wrote:
>
> On Sun, Dec 31, 2006 at 08:48:07AM -0800, novnov wrote:
>> Why would not be possible in plpgsql? It has loop etc, the only part I'm
>> not
>> sure it can do it use the variable as field name.
>
> The "dynamic" in dynamic language usually refers to dynamic typing.
> pl/pgsql is a strictly typed language which means one can look at the
> code and determine what type each variable will be.
>
> Languages like perl and python are dynamic because what type a variable
> is does not matter until runtime and the type can change every time you
> run it.
>
> The problem with using a variable as a field name is that you can no
> longer tell what type the result will be. It could be any type
> supported by postgres. pl/pgsql can't handle that, perl and python
> can...
>
> Hope this helps,
> --
> Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
>> From each according to his ability. To each according to his ability to
>> litigate.
>
>
>

--
View this message in context: http://www.nabble.com/Generic-timestamp-function-for-updates-where-field-names-vary-tf2899327.html#a8108978
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message novnov 2006-12-31 18:32:26 Re: Generic timestamp function for updates where field
Previous Message Adrian Klaver 2006-12-31 17:58:40 Re: Generic timestamp function for updates where field