Skip to main content

Questions tagged [sequence]

An object that can generate unique integers.

0 votes
1 answer
27 views

One of my clients has a database in which a single identity column (called id in that table) has two sequences associated with it(!) Both sequences display Sequence for identity column: <schema>....
Colin 't Hart's user avatar
2 votes
1 answer
326 views

I need to obtain multiple values from a sequence with only one query. On Stack Overflow I found this: https://stackoverflow.com/questions/896274/select-multiple-ids-from-a-postgresql-sequence The ...
blackgreen's user avatar
0 votes
3 answers
150 views

I'm using a PostgresSQL database as an eventstore. We used to use https://github.com/SQLStreamStore/SQLStreamStore But they had issues when having a lot of parallel transactions. Essentially we ...
ErazerBrecht's user avatar
1 vote
1 answer
185 views

wondering if the ANSI SQL standard has a portable way to create a sequence object and get values from it? I can't find a portable way, but search engines seem to confuse ANSI sql with MS SQL server, ...
mikeb's user avatar
  • 133
2 votes
1 answer
682 views

After a machine malfunction and a hurried transfer of data onto another machine, we have somehow ended up with some brand new sequences replacing old sequences as the backing for identity columns (and ...
John Denniston's user avatar
0 votes
2 answers
198 views

So I have a table that has a column labeled 'sequence', it is not in fact a sequence data type, just a numeric field that translates in the object model to show items in a certain order. In a handful ...
Jonathan Beck's user avatar
0 votes
2 answers
296 views

I started writing this post as a question but, while reproducing the error, I found the solution in the PostgreSQL documentation. So I'll share the solution here for the community. A PostgreSQL 14 ...
ValerioOliveira's user avatar
0 votes
1 answer
79 views

Somewhere in a large project a sequence is being incremented one too many times. Is there some way to add a trigger or watch to the sequence when .NEXTVAL is invoked so we can get a call stack and see ...
Yimin Rong's user avatar
0 votes
1 answer
34 views

I use PostgreSQL. Is there a query to get a list of all tables that do not have the unique constraint on the sequence column? If it helps forming a query I use "reference" for my sequence ...
Ron Piggott's user avatar
1 vote
1 answer
405 views

I have an SQLite DB, let's assume the id can be considered as the order of rows, I want to find repeating sequences in the table according to certain criteria. consider this example (http://sqlfiddle....
yossico's user avatar
  • 167
2 votes
2 answers
2k views

When using PHP’s lastInsertId() method with PostgreSQL, it’s necessary to know the name of the sequence. If I defined the column using GENERATED BY DEFAULT AS IDENTITY, I know I can get the sequence ...
Manngo's user avatar
  • 3,207
0 votes
1 answer
137 views

I have a table with two columns, one containing name and other numbers. For each name there is range of numbers and there are around 250 names in there. Range of every name is different. It may be 1 ...
Indresh Mangal's user avatar
0 votes
1 answer
225 views

We have the table as below. CREATE TABLE "STYLES" ( "STYLE_CODE" CHAR(8) GENERATED ALWAYS AS ("COLOR"||"FEATURE"||"SIZE"||"YEAR")...
fackman's user avatar
0 votes
1 answer
107 views

I created a pgpool instance which can connect to one master database(primary for write) and one read replica. I have enabled below parameter: disable_load_balance_on_write='dml_adaptive'; Now my ...
Sajith P Shetty's user avatar
0 votes
1 answer
274 views

I created a trigger function to set the value of a sequence in a remote database table, using dblink and setval. CREATE OR REPLACE FUNCTION my_function () RETURNS TRIGGER AS $$ DECLARE ... BEGIN ...
Sébastien Clément's user avatar

15 30 50 per page
1
2 3 4 5
14