Questions tagged [record]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer

How do you run "SELECT" on the composite type argument of an SQL function?

Example: Database: CREATE TABLE entities ( id bigint GENERATED ALWAYS AS IDENTITY PRIMARY KEY ); CREATE TYPE entity_id AS ( id bigint ); Function: CREATE FUNCTION ...
Biller Builder's user avatar
1 vote
0 answers

automatic cast of anonymous record array type to the array type of a named composite type in PostgreSQL?

From PostgreSQL documentation, it is possible to cast an anonymous record type to a named composite type at a function call site. Quoting the example there: CREATE TABLE mytable(f1 int, f2 float, f3 ...
tinlyx's user avatar
  • 3,425
2 votes
1 answer

SQLite Internals - Records

Hey I'm trying to wrap my head around SQLite data storage, specifically how it is storing Records. I've found a book The Definitive guide to SQLlite, where the author explains internal record format (...
Matis's user avatar
  • 121
3 votes
2 answers

How to get the column names of a RECORD?

I have a function that declares: DECLARE r RECORD; The data on this record varies and at some point I need to know the column names. How do I get the column names of a RECORD in another record ?
Thiago Sayão's user avatar
2 votes
1 answer

Return both one value and one column from pl/pgsql function

I wish my pl/pgsql function to go fetch and return two informations in my database in a single connection: one vector containing data whose type is unknown at call time (an array) one string value ...
iago-lito's user avatar
  • 123
3 votes
0 answers

Best way to cast array (text[]) to record-type?

PostgreSQL has the ability to create record types. A lot of operations like regexp_match return text[]. What is the most efficent way to go from text[] to a custom record type? Currently, I'm doing ...
Evan Carroll's user avatar
  • 62.2k
1 vote
3 answers

Record doesn't show if selecting earlier date interval

i encountered a very strange behaviour on mysql database. I have this complicated query: SELECT category, subcategory, sum(hours), count(hours), group_concat(concat(user,': ', comment) ...
Klemkas's user avatar
  • 13
3 votes
1 answer

SQL Server: ODBC Linked Server to Oracle does not return all rows

Let's say we have one SQL Server instance on one side: SQL Server 2008 R2 SP3 Oracle 11.2 client installed with OLEDB Drivers for ODBC .. and an Oracle database instance on another side: Oracle ...
Jefferson B. Elias's user avatar
-1 votes
1 answer

Generating Record Ids in Postgres [closed]

Using the UUID data type with its 256 chars seems like overkill, while assigning an auto-increment int4 seems less robust. Is there a more robust way to assign a record id without using uuid or an ...
GPP's user avatar
  • 201
2 votes
1 answer

How to estimate the storage needed for a database?

I ran across this questions trying to dive into a computer measurements worksheet online and for the life of me could not figure it out. This is the question: Assume each record in a database ...
jestermonkey's user avatar
1 vote
0 answers

How to use the value from record like as varchar?

I'm trying update a old table with result of selec for another tables but get a error using this sintaxe (e.g.): DO $$ DECLARE _roles refcursor; _onerole varchar; _record RECORD; ...
GustavoAdolfo's user avatar
0 votes
1 answer

PL/SQL cursors and records

I am a new to Pl/sql and I need to learn to write simple pl/sql scripts. Is there any difference between cursors and records in PL/sql? So far I find them both similar.
Null Pointer's user avatar
0 votes
1 answer

Change the row position of a record without messing anything else MySQL?

Hi I would like to ask if there is a smart way to change the record position of a table in mysql. My problem is this: I have a table with statistics data and when I recover all the details in a table ...
user3019105's user avatar
10 votes
2 answers

Insert RECORD into a table in a trigger function

I would like to insert a RECORD data type variable (NEW variable) into a table in a trigger. What would the SQL look like? The following attempts were unsuccessful: EXECUTE 'INSERT INTO my_table ...
Egidi's user avatar
  • 373
3 votes
4 answers

Insert values from a record variable into a table

I am developing a user-defined function that takes two arguments: create or replace function gesio( events_table_in regclass, events_table_out regclass) returns void as $$ ... $$ ...
arthur's user avatar
  • 868
1 vote
1 answer

Implementing a Record Keeper/Rollback System for a MySQL Database

What's the best way to create a record keeping table for all actions in my database? I have a number of tables inside one database and I want to create another that records all movements in every ...
Dom's user avatar
  • 113
2 votes
1 answer

Difference between return next and return record

What is the difference between RETURN NEXT and RETURN RECORD in PL/pgSQL? I find the manual quite confusing in explaining what RETURN RECORD actually does. What is a RECORD type?
JRR's user avatar
  • 465
1 vote
1 answer

Mysql setting a record as deleted or archive

Is there any way to omit some records in mysql select statement and not deleting them? We can easily add a column for example deleted and set it to 1 for deleted ones and keep them but the problem is ...
Abadis's user avatar
  • 111
11 votes
1 answer

What platform for a large record based mathematical database?

Hi I am a civil engineer with some experience of programming but I am not familiar with the vast range of options available today. Hope you could give me any pointers the best way to proceed. I want ...
user19109's user avatar
  • 111
66 votes
8 answers

What is the difference between a "record" and a "row" in SQL Server?

There was a rather innocuous question about adding dates and times in SQL Server that set off a rather fascinating taxonomic debate. So how do we differentiate between these related terms and how we ...
swasheck's user avatar
  • 10.6k