PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, October 23, 2022

[FIXED] How to translate USER_OBJECTS.TEMPORARY in PostgreSQL?

 October 23, 2022     postgresql     No comments   

Issue

I have this code in Oracle:

SELECT *
FROM USER_OBJECTS
WHERE  TEMPORARY = 'N'

I know that the USER_OBJECT table in Postgres is pg_catalog.pg_class, but what's the equivalent of the TEMPORARY column? Thanks


Solution

SELECT *
FROM pg_class 
WHERE relpersistence = 't';

REF: https://www.postgresql.org/docs/current/catalog-pg-class.html

relpersistence char p = permanent table/sequence, u = unlogged table/sequence, t = temporary table/sequence



Answered By - Adelino Silva
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing