Hi,
it seems to me that the following should work but it fails:
CREATE VIEW co AS SELECT LOCALTIMESTAMP::TIMESTAMP AS ov WHERE FALSE;
CREATE TABLE link (ov TIMESTAMP);
CREATE OR REPLACE VIEW co AS SELECT ov FROM link;
Markus
--
Markus Bertheau <[EMAIL PROTECTED]>
signature.asc
Description: T
Dnia 23-06-2005, czw o godzinie 22:03 +0200, Markus Bertheau napisał(a):
> Hi,
>
> it seems to me that the following should work but it fails:
>
> CREATE VIEW co AS SELECT LOCALTIMESTAMP::TIMESTAMP AS ov WHERE FALSE;
> CREATE TABLE link (ov TIMESTAMP);
> CREATE OR REPLACE VIEW co AS SELECT ov FRO
On Thu, 2005-06-23 at 22:03 +0200, Markus Bertheau wrote:
> Hi,
>
> it seems to me that the following should work but it fails:
>
> CREATE VIEW co AS SELECT LOCALTIMESTAMP::TIMESTAMP AS ov WHERE FALSE;
> CREATE TABLE link (ov TIMESTAMP);
> CREATE OR REPLACE VIEW co AS SELECT ov FROM link;
The da
Dnia 23-06-2005, czw o godzinie 16:19 -0400, Rod Taylor napisał(a):
> The data types are different, as one has the timestamp to (6) decimal
> places after seconds.
That's strange. I explicitly specified ::TIMESTAMP on both the view and
the table. Is that not unambiguous?
Markus
--
Markus Berthe
On Thu, 2005-06-23 at 22:27 +0200, Markus Bertheau wrote:
> Dnia 23-06-2005, czw o godzinie 16:19 -0400, Rod Taylor napisał(a):
>
> > The data types are different, as one has the timestamp to (6) decimal
> > places after seconds.
>
> That's strange. I explicitly specified ::TIMESTAMP on both the
Rod Taylor <[EMAIL PROTECTED]> writes:
> On Thu, 2005-06-23 at 22:27 +0200, Markus Bertheau wrote:
>> Dnia 23-06-2005, czw o godzinie 16:19 -0400, Rod Taylor napisa³(a):
>>> The data types are different, as one has the timestamp to (6) decimal
>>> places after seconds.
>>
>> That's strange. I expl
Tom Lane wrote:
> > If you SELECT 'abc'::varchar(6)::varchar, the end type is varchar(6).
>
> Yeah, this is exactly what's happening --- if you look at gram.y,
> LOCALTIMESTAMP is expanded to "'now'::text::timestamp(6)". I am
> unconvinced that the (6) is a very good idea though. The code says
>
Bruce Momjian writes:
> Tom Lane wrote:
>> but it doesn't seem to me to follow from what the spec says that we need
>> to explicitly cast the result of now() to six places. As long as it's
>> coming from gettimeofday it can't have more than 6 places anyway, and so
>> we might as well save the ext