General

Do you have a feature request or a good idea for how to improve PostgreSQL? You can use this forum to let us know. (This is an experiment; see http://www.postgresql.org/support/ for more offical ways to contact the PostgreSQL project. Please report actual bugs and conduct development discussions there.)

I suggest you ...

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  1. Proper table variables

    I'm really in need of in memory table variables like SQL Server has, so we can have proper re-use of query results in code.

    I've tried all the alternatives in Postgres and none of them are as good

    - CTE, great, and I use these a lot, but you can't do IF THEN conditionals inside them, which limits their usefulness

    - arrays, sure, but this is a database... I want to use SQL

    - temp tables, not good performance, even when they're unlogged, and I've experienced memory leak weirdness and crashes

    Bonus if we could have a similar syntax to…

    3 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      1 comment  ·  Flag idea as inappropriate…  ·  Admin →
    • make postgresql case sensitive

      Can you please make postgresql case sensitive by having a on a database. We are jumping through many hoops to be able to work on postgresql because of needing to surround bicamel names in double quotes. It would be really appreciated

      3 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
      • Incremental full vacuum / cluster

        A way to incrementally recover disk space and/or (re-)cluster, without using large amounts of temporary disk space

        Currently, the only way to recover disk space or recluster a table involves a full re-write of the table; even pg_repack does this (just in the background). If the disk is almost full, recovering disk space is impossible, even though that's the situation when it's most needed.

        It should be possible implement a feature that does both incrementally, using largely existing mechanisms, since rows are already moved around within a table when they are updated.

        If we apply an empty update to rows…

        3 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          0 comments  ·  Flag idea as inappropriate…  ·  Admin →
        • improve pivot

          The pivot functions: have a look at select pivot of Oracle, it's a lot cleaner. For example: why define the data type of each resulting column? Or at all? The data already has a type: this is absolutely unnecessary.

          It's the only thing I miss after going with Postgresql. I started using case statements instead of tablefunc.

          3 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            0 comments  ·  Flag idea as inappropriate…  ·  Admin →
          • Implement in pg_dump standard output for directory output format

            When PostgreSQL is run in a container then -Fd usage is complicated.
            I suggest -Fdz option, which dumps a gzipped archive of the directory that would be created by -Fd.

            3 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              0 comments  ·  Flag idea as inappropriate…  ·  Admin →
            • CTE pushdown

              Currently CTE materialize tables. It woult be nice to use it like a view.

              with mycte as VIEW (
                Select x from y where x < 100
              )
              select x from mycte where x > 3

              Result plan similar to: Select x from y where x > 3 and x < 100

              Generally:
              WITH name AS [[MATERIALIZED] VIEW] (...),
              other_name AS [[MATERIALIZED] VIEW] (...)
              ...

              18 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                0 comments  ·  Flag idea as inappropriate…  ·  Admin →
              • An "apply all" options for update/update conflict in bdr

                now last change wins , this feature will solve multiple server simultaneously reducing billing ballance

                3 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                • Custom localised support based on client connection

                  Consider the scenario: A financial system that prints invoices in a customer's preferred language (as major Telecoms companies do), or an educational that prints certificates in a student's language of preference. Currently Postgres does not allow that. I have tried setting lc_time (and even lc_messages), but the month name stays in the language of the server. It would be great to be able to install additional locales to postgres which would allow a simple database solution that would not require applications to do the footwork of formatting all dates. An implementation on to_char() may include specifying a custom locale as…

                  3 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                  • quote_regexp function to quote strings for use in regular expressions

                    It would be nice if postgres had a quote_regexp(string text) function that one could use to quote arbitrary strings so that they can be used e.g. in regexp_replace().

                    1 vote
                    Vote
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)
                      You have left! (?) (thinking…)
                      0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                    • UPDATE ... ON CONFLICT ... (aka "UPDATE IGNORE")

                      We have "INSERT ... ON CONFLICT ..." but not "UPDATE ... ON CONFLICT ...".

                      It is not easy to achieve in other ways since catching unique_violation exception applies to all updated rows, not just those with conflict.

                      43 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                      • Be able to raise an exception with a simple rule

                        Let us say I have a simple table like (CREATE TABLE taxes (id serial PRIMARY KEY, name varchar, standard boolean DEFAULT False NOT NULL))

                        It would be nice to be able to set a rule (CREATE OR REPLACE RULE default_tax_rate_not_deleteable AS ON DELETE TO taxes WHERE old.standard = true DO INSTEAD RAISE EXCEPTION 'standard tax rate not deleteable')

                        I know I can use a trigger, but a rule would be so simple and elegant. Remember the KISS principle;)

                        1 vote
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                        • Keep clustered tables clustered (aka pg_repack in pg core)

                          Clustered tables provide optimal read performance for the very common use case where a single dimension drives most queries.

                          However PG today doesn't keep data clustered over time. Fill Factor helps for Updates but Inserts ends up in new pages so breaks the sequentiality of the data.

                          To regain read performance the Cluster command needs to be scheduled causing downtime due to table level lock and complexity.

                          The suggestion is to keep data physically clustered via a background job (ala autovacuum), so essentially integrating pg_repack extension to the core.

                          Why not use pg_repack? Nowadays most PG instances are cloud hosted…

                          41 votes
                          Vote
                          Sign in
                          Check!
                          (thinking…)
                          Reset
                          or sign in with
                          • facebook
                          • google
                            Password icon
                            Signed in as (Sign out)
                            You have left! (?) (thinking…)
                            3 comments  ·  Flag idea as inappropriate…  ·  Admin →
                          • 1 vote
                            Vote
                            Sign in
                            Check!
                            (thinking…)
                            Reset
                            or sign in with
                            • facebook
                            • google
                              Password icon
                              Signed in as (Sign out)
                              You have left! (?) (thinking…)
                              0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                            • Materialized View partial refresh

                              refresh materialized view concurrently my_mat_view WHERE my_column = 'a';

                              At the moment, if the underlying data changes for a materialized view we have to refresh the entire materialized view. For large views with complex queries, this can sometimes take many hours. (especially concurrently). Sometimes it would be really convenient to tell the materialized view that only certain rows need to be refreshed at this time (with the hopes that it would take less time to process).

                              This would probably not work to add new rows to the materialized view. However for doing incremental refreshes of the materialized view for data…

                              35 votes
                              Vote
                              Sign in
                              Check!
                              (thinking…)
                              Reset
                              or sign in with
                              • facebook
                              • google
                                Password icon
                                Signed in as (Sign out)
                                You have left! (?) (thinking…)
                                2 comments  ·  Flag idea as inappropriate…  ·  Admin →
                              • show and edit pg_hba entries via sql SHOW and SET commands

                                Similar to the pg_settings view it would be great to have a corresponding view for the pg_hba file to show the settings via SHOW and change settings in the file via SET.

                                Of course only allowed for the superuser.

                                6 votes
                                Vote
                                Sign in
                                Check!
                                (thinking…)
                                Reset
                                or sign in with
                                • facebook
                                • google
                                  Password icon
                                  Signed in as (Sign out)
                                  You have left! (?) (thinking…)
                                  0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                • Allow avoiding "ERROR: current transaction is aborted, commands ignored until end of transaction block"

                                  Allow avoiding " ERROR: current transaction is aborted, commands ignored until end of transaction block " error (using session parameter or some other way). It's very annoying when writing the statements by hand.

                                  3 votes
                                  Vote
                                  Sign in
                                  Check!
                                  (thinking…)
                                  Reset
                                  or sign in with
                                  • facebook
                                  • google
                                    Password icon
                                    Signed in as (Sign out)
                                    You have left! (?) (thinking…)
                                    0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                  • psql: add `histappend` option

                                    At the moment, psql always overwrites ~/.psql_history when it is closed. This means that when you use multiple psql instances at the same time, only the history from the instance that you close last will persist, because it will overwrite the history from the other instances. bash has a histappend option for this purpose:

                                    histappend
                                    If set, the history list is appended to the file named by the value of the HISTFILE
                                    variable when the shell exits, rather than overwriting the file.

                                    It would be nice if this option could be added to psql.

                                    3 votes
                                    Vote
                                    Sign in
                                    Check!
                                    (thinking…)
                                    Reset
                                    or sign in with
                                    • facebook
                                    • google
                                      Password icon
                                      Signed in as (Sign out)
                                      You have left! (?) (thinking…)
                                      0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                    • temporal query as of sql ansi 2011 (oracle flashback query: view row versions for the x last weeks)

                                      Similar to oracle's flashback query:
                                      * have a parameter to keep rows history at least x days in the past - undo_retention)
                                      * execute a select query viewing how tables were at some point in time (select from ... as of timestamp...)
                                      * view all modifications of a row, and when it was done (select ... versions between)

                                      4 votes
                                      Vote
                                      Sign in
                                      Check!
                                      (thinking…)
                                      Reset
                                      or sign in with
                                      • facebook
                                      • google
                                        Password icon
                                        Signed in as (Sign out)
                                        You have left! (?) (thinking…)
                                        0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                      • 2 votes
                                        Vote
                                        Sign in
                                        Check!
                                        (thinking…)
                                        Reset
                                        or sign in with
                                        • facebook
                                        • google
                                          Password icon
                                          Signed in as (Sign out)
                                          You have left! (?) (thinking…)
                                          0 comments  ·  Flag idea as inappropriate…  ·  Admin →
                                        • Parallelize query execution on partitions and unions

                                          As of 9.6 only table scans seem to trigger parallel execution.

                                          We use partitioning (inheritance) to keep the child tables small, so that a full table scan does not take too long. But our queries frequently span multiple child tables. For us, it would be more efficient if each child table would be assigned to a worker.

                                          We could also use unions directly on the child tables (which has some advantages), and again we would want the child tables to be queried in parallel.

                                          A typical query (on the parent table):

                                          select port_wwn, avg( rx_traffic_util) as avg_rx_tfc_util from fc_port_stats_p1
                                          where…

                                          44 votes
                                          Vote
                                          Sign in
                                          Check!
                                          (thinking…)
                                          Reset
                                          or sign in with
                                          • facebook
                                          • google
                                            Password icon
                                            Signed in as (Sign out)
                                            You have left! (?) (thinking…)
                                            1 comment  ·  Flag idea as inappropriate…  ·  Admin →
                                          ← Previous 1 3 4 5 6 7 8
                                          • Don't see your idea?

                                          General

                                          Feedback and Knowledge Base