Search Postgresql Archives

Re: Procedure for feature requests?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 [ please don't top-post it's difficult to follow for those not directly
   involved in the discussion ]

On Sat, Oct 03, 2009 at 12:14:19PM -0400, Martin Gainty wrote:
> is there a way to create a cast with assignment e.g.?

Hum, I'm unsure how this would help.  Maybe more explanation would help?

> CREATE CAST ((date,date) AS int4) WITH FUNCTION generate_series(date,date) AS ASSIGNMENT;

generate_series returns to a SETOF values.  It also has *much* more
complicated semantics than I'd expect most people would attribute as
useful to a datatype conversion function.  For example, why would
casting from a pair of dates end up as a set of rows containing a single
date value?


I have a large problem understanding the real purpose casts so maybe I'm
missing something.  My problem is that I don't understand the purpose
of trying to provide a "standard" way of converting between arbitrary
datatypes, it seems much easier to just provide a standard set of domain
specific functions that are explicitly used by the user.  The SQL
standard specifies that they need to exist so PG has to support them,
but their purpose still confuses me!

-- 
  Sam  http://samason.me.uk/

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux