Coder Social home page Coder Social logo

supa_audit's Introduction

Supabase

Supabase is an open source Firebase alternative. We're building the features of Firebase using enterprise-grade open source tools.

  • Hosted Postgres Database. Docs
  • Authentication and Authorization. Docs
  • Auto-generated APIs.
  • Functions.
    • Database Functions. Docs
    • Edge Functions Docs
  • File Storage. Docs
  • AI + Vector/Embeddings Toolkit. Docs
  • Dashboard

Supabase Dashboard

Watch "releases" of this repo to get notified of major updates.

Watch this repo

Documentation

For full documentation, visit supabase.com/docs

To see how to Contribute, visit Getting Started

Community & Support

  • Community Forum. Best for: help with building, discussion about database best practices.
  • GitHub Issues. Best for: bugs and errors you encounter using Supabase.
  • Email Support. Best for: problems with your database or infrastructure.
  • Discord. Best for: sharing your applications and hanging out with the community.

How it works

Supabase is a combination of open source tools. We’re building the features of Firebase using enterprise-grade, open source products. If the tools and communities exist, with an MIT, Apache 2, or equivalent open license, we will use and support that tool. If the tool doesn't exist, we build and open source it ourselves. Supabase is not a 1-to-1 mapping of Firebase. Our aim is to give developers a Firebase-like developer experience using open source tools.

Architecture

Supabase is a hosted platform. You can sign up and start using Supabase without installing anything. You can also self-host and develop locally.

Architecture

  • Postgres is an object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
  • Realtime is an Elixir server that allows you to listen to PostgreSQL inserts, updates, and deletes using websockets. Realtime polls Postgres' built-in replication functionality for database changes, converts changes to JSON, then broadcasts the JSON over websockets to authorized clients.
  • PostgREST is a web server that turns your PostgreSQL database directly into a RESTful API
  • GoTrue is a JWT based API for managing users and issuing JWT tokens.
  • Storage provides a RESTful interface for managing Files stored in S3, using Postgres to manage permissions.
  • pg_graphql a PostgreSQL extension that exposes a GraphQL API
  • postgres-meta is a RESTful API for managing your Postgres, allowing you to fetch tables, add roles, and run queries, etc.
  • Kong is a cloud-native API gateway.

Client libraries

Our approach for client libraries is modular. Each sub-library is a standalone implementation for a single external system. This is one of the ways we support existing tools.

Language Client Feature-Clients (bundled in Supabase client)
Supabase PostgREST GoTrue Realtime Storage Functions
⚡️ Official ⚡️
JavaScript (TypeScript) supabase-js postgrest-js gotrue-js realtime-js storage-js functions-js
Flutter supabase-flutter postgrest-dart gotrue-dart realtime-dart storage-dart functions-dart
Swift supabase-swift postgrest-swift auth-swift realtime-swift storage-swift functions-swift
💚 Community 💚
C# supabase-csharp postgrest-csharp gotrue-csharp realtime-csharp storage-csharp functions-csharp
Go - postgrest-go gotrue-go - storage-go functions-go
Java - - gotrue-java - storage-java -
Kotlin supabase-kt postgrest-kt gotrue-kt realtime-kt storage-kt functions-kt
Python supabase-py postgrest-py gotrue-py realtime-py storage-py functions-py
Ruby supabase-rb postgrest-rb - - - -
Rust - postgrest-rs - - - -
Godot Engine (GDScript) supabase-gdscript postgrest-gdscript gotrue-gdscript realtime-gdscript storage-gdscript functions-gdscript

Badges

Made with Supabase

[![Made with Supabase](https://supabase.com/badge-made-with-supabase.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase.svg"
    alt="Made with Supabase"
  />
</a>

Made with Supabase (dark)

[![Made with Supabase](https://supabase.com/badge-made-with-supabase-dark.svg)](https://supabase.com)
<a href="https://supabase.com">
  <img
    width="168"
    height="30"
    src="https://supabase.com/badge-made-with-supabase-dark.svg"
    alt="Made with Supabase"
  />
</a>

Translations

supa_audit's People

Contributors

devurandom avatar jonairey avatar kornrunner avatar minus7 avatar olirice avatar yegorlitvinov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

supa_audit's Issues

Support the deletes for records inserted/updated before the audit was enabled

If the audit trigger is attached to the existing table then we are not actually able to track the deletes for the old records. Here is an example:

create table test1(
    id int primary key,
    val text
);

alter table test1 replica identity full;


insert into test1(id, val) select 1, 'ololo';

-- audit is attached after the record is inserted/updated
create trigger test1_audit_trigger before insert or update or delete on public.test1
    for each row execute procedure audit.change_trigger();

delete from test1 where id = 1;

select * 
from audit.record_version_history; -- what was the deleted record?

We may consider storing the deleted record JSON in the record field.
There are a number of audit triggers that use this approach, for example:

https://www.postgresql.org/docs/12/plpgsql-trigger.html#PLPGSQL-TRIGGER-AUDIT-EXAMPLE
https://wiki.postgresql.org/wiki/Audit_trigger
https://www.cybertec-postgresql.com/en/performance-differences-between-normal-and-generic-audit-triggers/

Cloud version

Since you are simply using an extension that uses SQL, you can make this available for contexts like the cloud that do not have access to the underlying operating system. Just simply import the file supa_audit--0.2.3.sql but first add the creation of the uuid ossp extension to the top of that file: CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

This could simply be added to the documentation instead of adding it as a feature request.

Applying extension via migrations not working for 0.3.1

The statements introduced in 0.3.1 prevent the extension to be automatically added via migrations.

With 0.3.0 I could just create a migration file and add the extensions that way, now with0.3.1 it fails with the error:

Error: ERROR: pg_extension_config_dump() can only be called from an SQL script executed by CREATE EXTENSION (SQLSTATE 0A000)
At statement 4: select                                                                    
    pg_catalog.pg_extension_config_dump ('audit.record_version_id_seq','')
Try rerunning the command with --debug to troubleshoot the error.

I checked the pg docs but couldn't really make sense of it. Any idea if there is a way to make this work?

Default for ts column

Why do you have the default for column ts set to "now() at time zone 'utc'"? This causes it to store the current local time as if it were UTC, which throws the time off if you're not really in the UTC/GMT time zone.

The timestamptz data type already takes care of converting whatever time it is given to UTC for storage. And it is automatically converted to the local time zone when output. So the default should just be "now()" for it to capture the truly correct time.

Who made a given change

Feature request

Is your feature request related to a problem? Please describe.

A common requirement (at least on projects I'm working on) is to keep record of which user did a particular change. So we need to store the user id (auth.uid() in supabase terms) somewhere in the audit.record_version so that we know who's responsible for every single change.

Describe the solution you'd like

The simplest solution would be to add, let's say changed_by column to the audit.record_version table and modify audit.insert_update_delete_trigger() to insert auth.uid() into that column. Done, that'll do the job for us, but maybe I'm missing something and there might be cases where this won't work or is unnecessary?

Another option would be to add a third jsonb column to the audit.record_version with metadata about the change. Then audit.enable_tracking() might be extended to expect an optional second parameter, instructing the trigger what data the extension user wants to store in the metadata column for each change, and current user uid would be one of the options. But that's probably an overkill?

Describe alternatives you've considered

I can't think of an alternative way to keep the information on who made a change without modifying or forking the extension.

Additional context

I'll be glad to make a PR if the above makes sense and other people also find this feature useful.

Scaling the audit table

The audit table can get quite large depending on how extensively it is used within a database. Can you suggest any optimized ways to partition this table, i.e., what partition key to use, etc. Or perhaps have multiple partition tables per group of tables, let's say within a particular schema?

ERROR: relation "xxxx" does not exist

Bug report

ERROR: relation "efa.nytest" does not exist

PostgreSQL 13.2 (Ubuntu 13.2-1.pgdg20.04+1

To Reproduce

jbi=# create table efa.nytest (id serial primary key, nr int);
 jbi=# select audit.enable_tracking('efa.nytest'::regclass);
ERROR:  relation "efa.nytest" does not exist
CONTEXT:  SQL statement "
        create trigger audit_i_u_d
            before insert or update or delete
            on "efa.nytest"
            for each row
            execute procedure audit.insert_update_delete_trigger();"
PL/pgSQL function audit.enable_tracking(regclass) line 19 at EXECUTE

Expected behavior

jbi=# create table kursuskatalog.nytest (id serial primary key, nr int);
CREATE TABLE
jbi=# select audit.enable_tracking('kursuskatalog.nytest'::regclass);
 enable_tracking 
-----------------
 
(1 row)

It works in schema 'kursuskatalog' but not in schema 'efa'. The "jbi" user has superuser privs and the schemas seems! to be the same.

Any ideas ?

Missing dependency on uuid-ossp

Bug report

Installing the extension, activating auditing for a table and then performing an audited action results in an error when the uuid-ossp extension is not installed. uuid_generate_v4 is part of the uuid-ossp extension, but supa_audit.control does not mark uuid-ossp as a dependency.

After running create extension "uuid-ossp"; it supa_audit works as expected.

2022-03-11 19:21:18.824 UTC [48] ERROR:  function uuid_generate_v4() does not exist at character 115
2022-03-11 19:21:18.824 UTC [48] HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
2022-03-11 19:21:18.824 UTC [48] QUERY:
            select
                case
                    when rec is null then null
                    when pkey_cols = array[]::text[] then uuid_generate_v4()
                    else (
                        select
                            uuid_generate_v5(
                                'fd62bc3d-8d6e-43c2-919c-802ba3762271',
                                ( jsonb_build_array(to_jsonb($1)) || jsonb_agg($3 ->> key_) )::text
                            )
                        from
                            unnest($2) x(key_)
                    )
                end
        
2022-03-11 19:21:18.824 UTC [48] CONTEXT:  SQL function "to_record_id" during inlining
        SQL statement "SELECT audit.to_record_id(TG_RELID, pkey_cols, record_jsonb)"
        PL/pgSQL function audit.insert_update_delete_trigger() line 10 during statement block local variable initialization

Docs for common use cases

Hey, I find this extension really useful 🙏

I am not sure about how some of the use cases should be approached with such a table.

Getting the history of a particular row

If I I want to get the history of a particular row from the primary table, should I query on the primary key inside of JSONB record?

Getting the most recent version of a particular row

I think that if I can get the history then the row with the latest ts is the most recent. So no question here 😄

Getting the previous record from the most recent record

It got a little bit confusing here. I thought that record_id would be unique for every record (we could hash record contents and ts to achieve uniqueness). With that in mind we could find the previous record by looking at old_record_id of the record (a linked list essentially).

But that is not how it works 🤔 The old_record_id and record_id are always the same, because they're based on the primary keys which don't change for the tracked record. I am not sure I understand the purpose of having to identical ids for each record... And I have hard time understanding the purpose of record_id itself – I don't know record_id beforehand to select based on its value. I have to query JSONB for the primary key that I know, and while at that I can just select all rows that match (and they will all have the same record_id).

I think I'm missing something that prevents me from using this extension correctly, so I would really appreciate your answer!

Does not install on Supabase unless `extensions` schema on search_path

We use uuid_generate_v4 as the default for uuid primary key columns.

On the supabase platform uuid_generate_v4 is under the extensions schema so running the install script fails unless you update it to include the prefix or add extensions to the search path for all users who might interact with auditing.

We used uuid_generate_v4 for backwards compatibility with old pg versions.

Proposed solution: Drop support for < pg14 so we can use builtin gen_random_uuid which will never require a schema name.

Previous releases will continue to work for < pg14

How can we use this extension when primary key is already in UUID format?

Bug report

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

Fails on insert in a table when the inserted row is as a result of auth.users trigger

Bug report

I have a table public.profiles that has an insert trigger from auth.users table when a new user signs up. This fails when creating a new user using the javascript web package supabase-js.

CREATE TABLE public.profile (
  id uuid NOT NULL REFERENCES auth.users (id),
  avatar_url text NULL,
  PRIMARY KEY ("id")
);

CREATE FUNCTION public.create_profile()
returns TRIGGER AS $$
BEGIN
  INSERT INTO public.profile (id)
  VALUES (new.id);
  return new;
END;
$$ language plpgsql security definer;

CREATE TRIGGER on_auth_user_create AFTER INSERT ON auth.users
  FOR EACH ROW EXECUTE PROCEDURE public.create_profile();

-- enable auditing
SELECT audit.enable_tracking('public.profile'::regclass);

To Reproduce

Using the javascript package supabase-js, returns 500 server error Database error saving new user. It works when I disable auditing.

Document Performance

Document the throughput limitations and note that this solution may not be appropriate for high throughput tables

Triggers should be `after`

Thanks for publishing this, Supabase! I am not a user, but I am a fan! I have used this as a starter for an audit log.

I think the triggers should be updated to after variant, not the before it is now. Or was there a reason that I do not see for using before?

When using INSERT ... ON CONFLICT DO UPDATE SET ... statement, the before trigger also tracks inserts, even if the effective change that should be tracked is the update part.

Record the user who made the change

Feature request

Is your feature request related to a problem? Please describe.

Supabase distinguishes itself by integrating authorization into the database. I would like to be able to use this auth information in supa audit

Describe the solution you'd like

I would like audited changes to record information about current_user or (if it is possible) auth.user_id()

Describe alternatives you've considered

I dont see any obvious alternatives to determine who initiated which changes.

Record the `application_name` connection parameter

Feature request

Is your feature request related to a problem? Please describe.

The application_name in the audit table can be useful to distinguish between changes made in different contexts (changes done by the end-user, using some user interface, vs changes done by some data migration)

The application_name can be any string (...). It is typically set by an application upon connection to the server. The name will be displayed in the pg_stat_activity view and included in CSV log entries.

https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME

Describe the solution you'd like

  1. add a new column
alter table audit.record_version
add column application_name TEXT;
  1. in the audit.insert_update_delete_trigger trigger, call current_setting
    insert into audit.record_version(
        record_id,
        old_record_id,
        op,
        table_oid,
        table_schema,
        table_name,
        record,
        old_record,
        application_name
    )
    select
        record_id,
        old_record_id,
        TG_OP::audit.operation,
        TG_RELID,
        TG_TABLE_SCHEMA,
        TG_TABLE_NAME,
        record_jsonb,
        old_record_jsonb,
        current_setting('application_name', 't');

Thanks for considering this suggestion.

Should `search_path` be set due to use of `SECURITY DEFINER`

Chore

Describe the chore

I was just reading the documentation for CREATE FUNCTION in postgres, and I see the following section:

Writing SECURITY DEFINER Functions Safely

Because a SECURITY DEFINER function is executed with the privileges of the user that created it, care is needed to ensure that the function cannot be misused. For security, search_path should be set to exclude any schemas writable by untrusted users.

Additional context

I was just wondering if search_path should be set for the SECURITY_DEFINER functions in supa_audit. I am not a postgres expert, so if this isn't necessary for this repository, I would like to learn why not.

Error when selecting the "Server Error" filter on Auth audit logging

Bug report

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to the Logs section
  2. Click on Auth
  3. Click on the Status Code dropdown
  4. Select Server Error
  5. See error: "Sorry! An error occurred when fetching data. sql parser error: Unterminated string literal at Line: 2, Column 41"

Expected behavior

Expected to see Auth audit log

Screenshots

image

image

System information

  • OS: macOS
  • Browser (if applies) Chrome

Uppercase table name.

I can't enable uppercase table.
select audit.enable_tracking('public.**Account'**::regclass);
I've tried everything but I can't get it to work.
Thank you

Enable auditing, but ignore specific columns

Feature request

Is your feature request related to a problem? Please describe.

Right now every update on a row will get cause a new record in the record_version table. There are certain columns I would want to exclude from the trigger. In my case that's a "last_fetched_at" column which is more of a debug information than something that has to be audited. I could also see it being useful for sensitive information that you maybe don't want to have replicated in multiple places.

Describe the solution you'd like

When enabling the tracking on a table (select audit.enable_tracking('public.users'::regclass); we could pass a list of columns that should be included or excluded (To be decided what makes more sense). If it would be decided that we could provide a list of columns to ignore it could look like this:

select audit.enable_tracking('public.users'::regclass, '{last_fetched_at}');

I'm not sure what's the best way in PG to get the list of columns, and remove the one on the ignore list in the trigger dynamically without a big performance hit in the hot-path. This looks somehow useful but I'm not sure if there's a better way.

Do you think something like this would be considered?

Add supa_audit to extensions lib

Wondering why supa_audit is not pre-installed into the extensions library as supautils for example?

Would be a great addition imo ...

make install fails

I am able to do the make, but when I do make install it fails with:

/usr/bin/mkdir -p '/usr/pgsql-12/lib'
/usr/bin/mkdir -p '/usr/pgsql-12/share/extension'
/usr/bin/mkdir -p '/usr/pgsql-12/share/extension'
/usr/bin/install -c -m 755  supa_audit.so '/usr/pgsql-12/lib/supa_audit.so'
/usr/bin/install -c -m 644 .//supa_audit.control '/usr/pgsql-12/share/extension/'
/usr/bin/install -c -m 644 .//supa_audit--0.1.0--0.2.0.sql .//supa_audit--0.2.2--0.2.3.sql .//supa_audit--0.2.1--0.2.2.sql .//supa_audit--0.2.3.sql .//supa_audit--0.2.0--0.2.1.sql  '/usr/pgsql-12/share/extension/'
/usr/bin/mkdir -p '/usr/pgsql-12/lib/bitcode/supa_audit'
/usr/bin/mkdir -p
/usr/bin/mkdir: missing operand
Try '/usr/bin/mkdir --help' for more information.
make: *** [/usr/pgsql-12/lib/pgxs/src/makefiles/pgxs.mk:234: install] Error 1

Interesting though, it does successfully put the extension in the target PG extension directory.

Also, you may want to add some requisites for this, namely, that the PG development package needs to be installed first.

Also, consider adding documentation to configure your PG environment before doing the make and make install. Need to set path = target pg bin directory:$PATH. This will fix references to pg_config as well.

v0.2.0 make, cannot stat './/supa_audit--0.1.0.sql'

Bug report

Describe the bug

If you checkout out the tagged v0.2.0 release make install will fail, with the error /usr/bin/install: cannot stat './/supa_audit--0.1.0.sql': No such file or directory

To Reproduce

  1. do git checkout tags/v0.2.0
  2. Run make install

Expected behavior

A clean build to be produced.

Additional context

I could fix the issue by using the value from main which is DATA = $(wildcard *--*.sql).

Add to audit table username

Supa_audit is fantastict!, but, to my total satisfaction, I miss being able to have a field with the username that performs the crud operation
My postgrsql knowledge is poor, sorry if i ask something impossible or trivial.
Would it be possible to add the username that performs the operation (insert, update, delete)?
Thanks

ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883)

Bug report

Describe the bug

I like this lightway method to perform auditing and certain tables. So I installed version 0.3.0 on supabase with enabled uuid-ossp extension. Then I enabled auditing for table auth.users with select audit.enable_tracking('auth.users.account'::regclass);.
If a user now tries to compleete a signup, it fails with error "database error saving new user".
According to the Auth log uuid_generate_v4() does not exist (see below log).

{ "component": "api", "error": "failed to close prepared statement: ERROR: current transaction is aborted, commands ignored until end of transaction block (SQLSTATE 25P02): ERROR: function uuid_generate_v4() does not exist (SQLSTATE 42883)", "level": "error", "method": "POST", "msg": "500: Database error saving new user", "path": "/otp", "referer": "", "remote_addr": "123.123.123.123", "time": "2022-11-02T17:42:10Z", "timestamp": "2022-11-02T17:42:10Z" }

To Reproduce

Double checking if extension uuid-ossp is enabled: YES
Does uuid_generate_v4() normaly work: YES - select uuid_generate_v4(); generates a propper formated UUID

After disabling the audit_i_u_d trigger, which calls the function insert_update_delete_trigger, user signup works again.
Enabling the trigger again I can see the same error as described above.

Expected behavior

Not sure why uuid_generate_v4() does not work in function to_record_id and outside it does.

System information

All running on Supabase

How do I apply this to my database?

Improve documentation

How do I add this to my postgres database easily?

I can see there are migrations here - but if applying to a database for the first time wouldn't a single script be best?

Clearly I am not a postgres expert but I expected to simply be able to grab a .sql or .ddl file and run it. Not figure out how to apply multiple migrations. Any advice would be appreciated!

Link

Add a link to the page which needs improvement (if relevant)

Describe the problem

Is the documentation missing? Or is it confusing? Why is it confusing?

Describe the improvement

A clear and concise description of the improvement.

Additional context

Add any other context or screenshots that help clarify your question.

Insert trigger coalesce old new is backwards

Bug report

Describe the bug

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: [e.g. 6.0.2]
  • Version of Node.js: [e.g. 10.10.0]

Additional context

Add any other context about the problem here.

Make Install error with llvm

This is related to closed issue#30. I found a workaround by doing the make install bypassing llvm.
make install USE_PGXS=1 with_llvm=no

Without it:

/bin/mkdir -p '/usr/lib/postgresql/13/lib'
/bin/mkdir -p '/usr/share/postgresql/13/extension'
/bin/mkdir -p '/usr/share/postgresql/13/extension'
/usr/bin/install -c -m 755  supa_audit.so '/usr/lib/postgresql/13/lib/supa_audit.so'
/usr/bin/install -c -m 644 .//supa_audit.control '/usr/share/postgresql/13/extension/'
/usr/bin/install -c -m 644 .//supa_audit--0.1.0--0.2.0.sql .//supa_audit--0.2.2--0.2.3.sql .//supa_audit--0.2.1--0.2.2.sql .//supa_audit--0.2.3.sql .//supa_audit--0.2.0--0.2.1.sql  '/usr/share/postgresql/13/extension/'
/bin/mkdir -p '/usr/lib/postgresql/13/lib/bitcode/supa_audit'
/bin/mkdir -p
/bin/mkdir: missing operand
Try '/bin/mkdir --help' for more information.
/usr/lib/postgresql/13/lib/pgxs/src/makefiles/pgxs.mk:232: recipe for target 'install' failed
make: *** [install] Error 1

with_llvm=no:

/bin/mkdir -p '/usr/lib/postgresql/13/lib'
/bin/mkdir -p '/usr/share/postgresql/13/extension'
/bin/mkdir -p '/usr/share/postgresql/13/extension'
/usr/bin/install -c -m 755  supa_audit.so '/usr/lib/postgresql/13/lib/supa_audit.so'
/usr/bin/install -c -m 644 .//supa_audit.control '/usr/share/postgresql/13/extension/'
/usr/bin/install -c -m 644 .//supa_audit--0.1.0--0.2.0.sql .//supa_audit--0.2.2--0.2.3.sql .//supa_audit--0.2.1--0.2.2.sql .//supa_audit--0.2.3.sql .//supa_audit--0.2.0--0.2.1.sql  '/usr/share/postgresql/13/extension/'

Audit table cannot be backed up

Bug report

The audit.record_version table and audit.record_version_id_seq sequence are not included when using pg_dump and there is no way to make pg_dump export the data. Imo audit tables should very much be backed up by default. For example, a major version upgrade by means of dump/import would wipe all audit data.

A possible solution would be to mark the table and sequence as configuration.

Error with Postgres 10 in Windows when Insert and Delete

Bug report

Describe the bug

Error when insert not found old statement
Error when delete not found new statement

A clear and concise description of what the bug is.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to '…'
  2. Click on '…'
  3. Scroll down to '…'
  4. See error

Expected behavior

Insert to audit table

A clear and concise description of what you expected to happen.

Screenshots

https://ibb.co/K2NYy0d

create schema if not exists audit;

If applicable, add screenshots to help explain your problem.

System information

Use Postgres from EDB Installator

  • OS: Windows
  • Browser (if applies) [e.g. chrome, safari]
  • Version of supabase-js: xxx
  • Version of Node.js: xxx

Additional context

Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.