Skip to content
New issue

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

.usql_history file appears corrupt, no newlines saved? #414

Open
mmisiewicz opened this issue May 24, 2023 · 0 comments
Open

.usql_history file appears corrupt, no newlines saved? #414

mmisiewicz opened this issue May 24, 2023 · 0 comments

Comments

@mmisiewicz
Copy link

Using usql 0.14.6 for accessing a Postgres database, I'm finding that the history file is often corrupted on exiting, and I'm not able to search my history from previous sessions.

An example:

\d subreddits\d reddit_subredditsalter table reddit_subreddits add column json_errors json;\d reddit_threadselect * From reddit_subreddits limit 5\Gselect * from reddit_subreddits where url = '/r/all/;select * from reddit_subreddits where url = '/r/all/';select * from reddit_subreddits where url = '/r/popular';select * from reddit_subreddits where url ~* '/r/popular';select * from reddit_subreddits where url ~* '/r/all';insert into reddit_subreddits (url, title, num_subs, over18) values ('/r/all/', 'All', 1e6, true), ('/r/popular', 'Popular', 1e6, true);select * from reddit_subreddits where name = 'All';select * from reddit_subreddits where title'All';select * from reddit_subreddits where title ='All';select * from reddit_subreddits where title ='Popular';update reddit_subreddits set (last_seen_date, first_seen_date) = (now(), now()) where title ='Popular';update reddit_subreddits set (last_seen_date, first_seen_date) = (now(), now()) where title ='All';alter table reddit_subreddits add column threads_last_scraped timestamptz;select *

It looks like there are no newlines being saved in the history file.

I have a .usqlrc:

\set SYNTAX_HL_STYLE solarized-dark
\pset time '2006-01-02 15:04:05'
\pset numericlocale true
\timing

System: macOS 13.3, M1, hombre usql 0.14.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant