Skip to main content
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
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
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 not deleted user 75908

All versions of PostgreSQL. Add an additional version-specific tag like [postgresql-13] if that context is relevant.

1 vote
1 answer
117 views

How to retrieve a view column derivation in PostgreSQL or Greenplum

I want to retrieve the derivation expression of a column in a view, and I want to do it dynamically from within a stored procedure, so psql \d+ or pgAdmin is no use to me. Where can I retrieve this i …
PhilHibbs's user avatar
  • 539
0 votes

When postgresql sequences get out of sync?

This happened to me, when I first started using a PostgreSQL variant (Greenplum). I renamed a table, created a new table under the original name, and ran an INSERT to copy the data across. … I did not know that PostgreSQL implemented SERIAL columns with an associated sequence, and when the new table got a new sequence that started at 1, I got duplicates in the table when I started inserting …
PhilHibbs's user avatar
  • 539
1 vote
0 answers
47 views

When was a table created? [duplicate]

Is there any way to find out when a table was created in PostgreSQL or Greenplum, other than finding the underlying table and looking at the OS creation timestamp? …
PhilHibbs's user avatar
  • 539
1 vote

Amount of time FULL VACUUM/VACUUM

You should never stop a vacuum process, ever. A vacuum full will completely recreate the table, so it should take roughly as long to run as it would to create and populate a brand new table and index …
PhilHibbs's user avatar
  • 539
2 votes
1 answer
62 views

Why do PostgreSQL examples say `+ integer '7'`? [closed]

The PostgreSQL date functions documentation contains the following example: date '2001-09-28' + integer '7' Why does it consist of converting a string to an integer? …
PhilHibbs's user avatar
  • 539
9 votes
1 answer
18k views

How to get the sequence name for a serial column

As far as I can tell, this query should show the expression for the new value of a serial column: select d.adsrc from ( SELECT a.attrelid, a.attnum, n.nspname, c.relname, a.attname FROM pg_catalog. …
PhilHibbs's user avatar
  • 539