Comments (7)
The format string would be %d/%b/%Y:%T %z
.
-
I assume that log source is PostgREST
supabase/docker/volumes/logs/vector.yml
Line 95 in e559600
-
Sample timestamp would be
06/May/2024:08:16:11 -0500
according to PostgREST observability documentation -
parse_timestamp function accepts strptime format string and is implemented in Rust chrono crate.
Here is a reproducible example for timestamp parsing:
use chrono::DateTime;
use chrono::offset::FixedOffset;
use chrono::format::ParseError;
fn parse_date(date_str: &str) -> Result<DateTime<FixedOffset>, ParseError> {
DateTime::parse_from_str(date_str, "%d/%b/%Y:%T %z")
}
fn main() {
let timestamp = "06/May/2024:08:16:11 -0500";
println!("Original timestamp: {}", timestamp);
match parse_date(timestamp) {
Ok(date) => println!("Parsed date: {}", date),
Err(e) => println!("Failed to parse date: {}", e),
}
}
which outputs
$ cargo run
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.02s
Running `target/debug/parse-pgrest-timestamp`
Original timestamp: 06/May/2024:08:16:11 -0500
Parsed date: 2024-05-06 08:16:11 -05:00
from supabase.
Thanks for the help.
I forgot to mention that the version of vector I was trying to use is 0.38 while in the master branch we use 0.28.1 here.
Are there any reasons not to upgrade to 0.38? 0.2x version is quite old now.
from supabase.
@stefanstidlffg Could you change the issue so it matches the issue template? https://github.com/supabase/supabase/issues/new?assignees=&labels=bug&projects=&template=1.Bug_report.md
from supabase.
I don't think it's a bug in the current code. It's just a breaking change if you ever go to vector 0.3x.
I could do a PR with the update to vector 0.38 if you prefer that. But I don't know if anything else is affected by the update.
from supabase.
I have modified the title to reflect the end goal, @stefanstidlffg if you can modify the issue description to follow the template, that would be great. 🙏
feel free to open a PR if anyone does want to tackle this!
from supabase.
I have modified the title to reflect the end goal, @stefanstidlffg if you can modify the issue description to follow the template, that would be great. 🙏
feel free to open a PR if anyone does want to tackle this!
I would if you tell me which template matches the situation. As said before this is not a bug.
from supabase.
@stefanstidlffg Yes it is not a bug for the current version. But eventually it will break when someone decide to upgrade pgvector and it is not forward compatible. Assuming parse_timestamp
is available for current version you could only fix the timestamp parsing code
from supabase.
Related Issues (20)
- default `main` edge function fails with `{"msg":"ReferenceError: EdgeRuntime is not defined"}` HOT 5
- Include request/response size limits in Edge Functions docs HOT 2
- Running `Deno Test` on Supabase Edge Functions in GitHub Actions HOT 1
- Docs include `count` named option for every function call HOT 1
- Docker - missing quotation marks in studio service healthcheck test HOT 2
- Issues matching the code challenge and code verifier during PKCE Oauth flow. HOT 1
- db diff failed failed to connect 127.0.0.1 with dial error (timeout)
- localhost no longer works for api_url
- Vercel environment variables aren't marked as `sensitive` in preview HOT 1
- NextJS Quickstart not showing data for notes table from database HOT 1
- Supabase Production REST Middleware Removing Auth from non supabase clients. HOT 2
- Supabase sessions not working across multiple subdomains in next.js multi-tenanted App HOT 1
- Display rate limit in Official Next + Supabase Quick Start
- Missing "extensions" in SEARCH_PATH on self-hosted Supabase
- Bug: types.gen generated without any modification in database because view references twice same table
- Creating a RLS Insert Policy without CHECK creates an unusable policy
- Python client library use like method can not use '%keyword%' HOT 1
- Adding new policy modal has overlapping buttons HOT 3
- Find widget in the sql editor overlaps with the ai button.
- supabase sign up error : Could not authenticate user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supabase.