PostgreSQL: column "rolcatupdate" does not exist error? - postgresql

I installed PostgreSQL on new server.
When I try create new table or new data base, get this error:
column "rolcatupdate" does not exist.
How can I fix it?

What client/framework are you using for creating a table?
In Postgres 9.5 "rolcatupdate" is not anymore supported (list of pg_roles: https://www.postgresql.org/docs/current/static/view-pg-roles.html)
It might be that some client(s)/framework(s) still use it.
From the ChangeLog:
Remove the pg_authid catalog's rolcatupdate field, as it had no usefulness (Adam Brightwell)

Related

How to find relationships of removed column in PgAdmin4/

I have a psql rds aws database which is opened in my PgAdmin4 client.
And recently i removed one column from table in this database.
But now in my app i see error from backend column student.scale does not exist
I know it's because of me who deleted this column.
But how do i find out what is callind this column.
As in backend code there nothing what could call this column, so it's something in Database some relationship or key.
Is there way how i can find out it the easy way ?

Can't select from database without specifying schema name

I am new to databases and I was trying to set up PostreSQL and trying to query
tables in pgAdmin 4, but I always have to specify schema name as such:
SELECT * FROM infection_database.country
The database name is the same as the schema name. This is probably not good but I didn't know better.
I tried looking up some solutions and found and tried this, but it didn't fix the issue:
ALTER DATABASE infection_database SET search_path="infection_database";
Tried both with and without quotation marks if it matters. Where am I making a mistake?
Given solution works, but you need to restart the session for the changes to take effect.
Credit to #jjanes

Error while creating table in postgres 8.1

My query:
create table schema1.new_table (like schema2.some table);
gives an error.
Is this due to version 8.1?
Is it possible to use two different schemas while creating table?
Simple typo (spot the underscore)?
create table schema1.new_table (like schema2.some_table);
And you probably want to do this including defaults.

How to enforce column order with Liquibase?

Setup:
liquibase 3.3.5
PostgreSQL 9.3
Windows 7 Ultimate
Having set the Liquibase.properties file with
changeLogFile = C://temp/changeset.xml,
I created a diff file with Liquibase (3.3.5).
liquibase.bat diffChangeLog
Examination of the changeset.xml file shows
-<addColumn tableName="view_dx">
<column type="int8" name="counter" defaultValueNumeric="0" defaultValue="0"/>
</addColumn
Problem is when
liquibase.bat update
is run, the changed table is NOT in the same column order as the reference table. This causes issues with the stored procedures using SETOF to return table rows.
Without destroying the existing table on the target database, how can column order be enforced using Liquibase?
TIA
I don't think that you can, in general, get Liquibase to enforce a column ordering. You will probably need to change your stored procedures to use column names rather than relying on position, which is a good habit to get into anyway.
Have you tried using afterColumn attribute of addColumn tag ?

Mysterious disappearance of an Index in an Oracle 10g table

I have a table in an Oracle database. An Index has mysteriously disappeared. Is there any way to find out how that happened? I am using Toad for Oracle Version 9.5.0.31
Thanks
I'm not sure you can find out after the fact but you can log future DROPs"
CREATE or replace TRIGGER your_name AFTER DROP
ON your_schema
pl/sql_block
You'll also have to create a logging table and insert into it.