Intervals within information_schema
I was looking over the "FIXME" marks within the information_schema.sql,
and the last ones left (after my previous patch) are for interval_type
and interval_precision. It looks to me as if the standard is
differentiating between datetime_precision and interval_precision (see
attached patch), so I pulled those apart (for one view). Does anyone
know what is supposed to go into the interval_type field?
Thanks,
--
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200608241454
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
Attachments:
interval_precision.patchtext/x-patch; charset=ISO-8859-1; name=interval_precision.patchDownload+13-7
Greg Sabino Mullane wrote:
I was looking over the "FIXME" marks within the
information_schema.sql, and the last ones left (after my previous
patch) are for interval_type and interval_precision. It looks to me
as if the standard is differentiating between datetime_precision and
interval_precision (see attached patch), so I pulled those apart (for
one view). Does anyone know what is supposed to go into the
interval_type field?
INTERVAL_TYPE IN
( 'YEAR', 'MONTH', 'DAY', 'HOUR', 'MINUTE', 'SECOND',
'YEAR TO MONTH', 'DAY TO HOUR', 'DAY TO MINUTE',
'DAY TO SECOND', 'HOUR TO MINUTE',
'HOUR TO SECOND', 'MINUTE TO SECOND' )
Also, depending on which one of these is specified, the precision field
varies in meaning. I haven't done a complete analysis, but it might
not be as simple as your patch suggests.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Does anyone know what is supposed to go into the interval_type field?
INTERVAL_TYPE IN
( 'YEAR', 'MONTH', 'DAY', 'HOUR', 'MINUTE', 'SECOND',
'YEAR TO MONTH', 'DAY TO HOUR', 'DAY TO MINUTE',
'DAY TO SECOND', 'HOUR TO MINUTE',
'HOUR TO SECOND', 'MINUTE TO SECOND' )Also, depending on which one of these is specified, the precision field
varies in meaning. I haven't done a complete analysis, but it might
not be as simple as your patch suggests.
Yes, I saw some docs that hinted as much. I'm still not clear on exactly
what interval_type is supposed to represent, or at least how it would ever
apply to a Postgres attribute. It almost seems as though the spec is calling
for interval_type of 'HOURS' and interval_precision of '2' for an example
interval of '2 hours'? I'd normally say that we should leave it as NULL in
such a case, but someone added a "FIXME" at some point, which led me to
ask exactly what should go in there. Not a big deal, I suppose - it looks
as though few, if any, other products are using those fields either.
Thanks for the reply.
- --
Greg Sabino Mullane greg@turnstep.com
End Point Corporation
PGP Key: 0x14964AC8 200608250614
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----
iD8DBQFE7s26vJuQZxSWSsgRAjFZAJ9SNXevNWtN0HXCK9D0FPsYN/9FTQCfeDX8
srbrlp4kO3co/bKPmCjP+q8=
=YaXx
-----END PGP SIGNATURE-----