We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a table which creates like:
create_table = [sql| CREATE TABLE IF NOT EXISTS sometable ( ... , time TIMESTAMP WITH TIME ZONE NOT NULL ... ); |]
Then I create someschema from sometable. Field time goes via psql functions: tstzrange, MAX and time_bucket(tsdb)
someschema
sometable
time
tstzrange
MAX
time_bucket
Then I have a query to this table:
data <- query conn Sql.selectFromSomeSchema (timeZoneName $ zonedTimeZone from, ...)
Sql query looks like:
selectFromSomeSchema = [sql| SELECT timezone(?, LOWER(range)) , timezone(?, UPPER(range)) , CAST(EXTRACT(EPOCH FROM (UPPER(range) - LOWER(range))) AS INTEGER) FROM someschema WHERE ... |]
And I have an error:
"Incompatible {errSQLType = \"timestamp\", errSQLTableOid = Nothing, errSQLField = \"timezone\", errHaskellType = \"ZonedTime\", errMessage = \"\"}"
The text was updated successfully, but these errors were encountered:
Timestamptz does not store the timezone on a per-value or per-column basis. You should read the documentation I wrote in the Time module.
Time
Sorry, something went wrong.
Also, you might be interested in reading the discussion of issue #69.
No branches or pull requests
I have a table which creates like:
Then I create
someschema
fromsometable
. Fieldtime
goes via psql functions:tstzrange
,MAX
andtime_bucket
(tsdb)Then I have a query to this table:
Sql query looks like:
And I have an error:
The text was updated successfully, but these errors were encountered: