Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 12663

All versions of PostgreSQL. Add an additional version-specific tag like postgresql-11 if that context is important.

0
votes
3answers
I have a function that abstracts updating event data: async ( connection: DatabaseConnectionType, id: number, venueId: number, movieId: number, cinemaMovieNameId: number, date: string, …
asked May 6 '18 by Gajus
0
votes
1answer
I am currently using SKIP LOCKED FOR UPDATE to schedule tasks as such: UPDATE task SET started_at = NOW() WHERE id IN ( SELECT id FROM task WHERE /* ... bunch of logic ... */ LIMIT 1 FOR UP …
asked May 19 '18 by Gajus
0
votes
It does work as expected. To test it, start two sessions and use explicit transactions, e.g. Session 1: BEGIN; SELECT * FROM outstanding_task WHERE id=1 FOR UPDATE SKIP LOCKED Session 2: -- Here …
answered May 19 '18 by Gajus
0
votes
3answers
postgresql documentation gives an example timerange definition: CREATE FUNCTION time_subtype_diff(x time, y time) RETURNS float8 AS 'SELECT EXTRACT(EPOCH FROM (x - y))' LANGUAGE sql STRICT IMMUTABLE …
asked Dec 31 '18 by Gajus
0
votes
() BETWEEN current_date + maintenance_window_starts_at AND current_date + maintenance_window_starts_at + maintenance_window_duration FROM maintenance_task; Both solutions were suggested by the members of Freenode #postgresql community. …
answered Dec 31 '18 by Gajus
2
votes
4answers
I have a complex SELECT query table that identifies relationship between event_id and attribute. Here is a simplification with a VALUES expression: SELECT event_id, attribute FROM ( VALUES (1, …
asked May 13 '18 by Gajus
0
votes
Client can be configured to receive the auto_explain message by setting client_min_messages=log. Example configuration: -- Load the extension. LOAD 'auto_explain'; -- or (if you are using AWS RDS): …
answered Dec 31 '18 by Gajus
0
votes
1answer
I have a table that records observed movies in a cinema: CREATE TABLE cinema_movie_name ( id integer DEFAULT nextval('cinema_movie_name_id_seq'::regclass) PRIMARY KEY, cinema_id integer NOT NULL …
asked Aug 15 by Gajus
2
votes
For the record, this is what I have come up with: WITH event_attribute AS ( SELECT event_attribute.event_id, event_attribute.attribute FROM ( VALUES (1, '2D'), …
answered May 13 '18 by Gajus
2
votes
1answer
Is it possible to get EXPLAIN ANALYZE output (e.g. as a notice) in addition to the regular query output? I am designing a postgresql client and I would like to add a feature that automatically turns …
asked Dec 31 '18 by Gajus
1
vote
1answer
I have written a custom PostgreSQL client and I want to add a function that would automatically capture query execution time. The current executionTime value in Slonik results records the total …
asked Jul 3 by Gajus
1
vote
I really overcomplicated this. As suggested by @Gaius, all I needed to do is to query all the data grouped by the hour of the purchase, i.e. SELECT ts1.date, ROUND(EXTRACT(EPOCH FROM (ts1.starts …
answered May 3 '18 by Gajus
0
votes
1answer
I need to display a chart that would illustrate how many ticket sales happen at different time intervals on different dates, e.g. How many tickets for Friday show get sold 3 hours in advance, etc. Th …
asked May 3 '18 by Gajus
1
vote
2answers
I am implementing a cursor based pagination. The requirement is to sort a dataset by an arbitrary condition (e.g. description) and return N rows after X row (where X represents the last item on the l …
asked Mar 3 by Gajus
2
votes
1answer
I need my program code to ensure that certain part of logic is being executed within a transaction. What query would tell me the current transaction ID / other information that would allow me to det …
asked May 31 '18 by Gajus

15 30 50 per page