Re: OID out of range

2020-01-15 Thread Rob Sargent
> On Jan 15, 2020, at 12:17 PM, Konireddy Rajashekar > wrote: > > @Alvaro Herrera, Can i alter the datatype of relid to oid and try ? > Not if Alvaro’s theory is correct. List that column, check for nulls, values greater the 2^32.

Re: OID out of range

2020-01-15 Thread David G. Johnston
; and > c.relnamespace::regnamespace::text='rpx_reporting_stage' and > u.captured_dt::date=current_date - interval '1 days' > ; > > > ERROR: OID out of range > >> >> Yeah, the join isn't the problem, the error is casting to OID, not from... Pretty sure your problem is: pg_relation_size(u.table_size) David J.

Re: OID out of range

2020-01-15 Thread Konireddy Rajashekar
@Alvaro Herrera, Can i alter the datatype of relid to oid and try ? On Thu, Jan 16, 2020 at 12:41 AM Alvaro Herrera wrote: > On 2020-Jan-15, Konireddy Rajashekar wrote: > > > rangetest-# \d user_tables_sizes > > Table "user_tables_sizes" > >Column|Type

Re: OID out of range

2020-01-15 Thread Alvaro Herrera
On 2020-Jan-15, Konireddy Rajashekar wrote: > rangetest-# \d user_tables_sizes > Table "user_tables_sizes" >Column|Type | Collation | Nullable | Default > -+-+---+--+- > relid

Re: OID out of range

2020-01-15 Thread Konireddy Rajashekar
)) as diff from user_tables_sizes u join pg_class c on u.relid::varchar= c.oid::varchar where c.relkind='r' and c.relnamespace::regnamespace::text='rpx_reporting_stage' and u.captured_dt::date=current_date - interval '1 days' ; ERROR: OID out of range On Thu, Ja

Re: OID out of range

2020-01-15 Thread David G. Johnston
On Wed, Jan 15, 2020 at 11:36 AM bhargav kamineni wrote: > Any workaround to make it work ? > Convert both to text and join on that? Curious choice making relid numeric... David J.

Re: OID out of range

2020-01-15 Thread bhargav kamineni
Any workaround to make it work ? On Thu, 16 Jan 2020 at 00:00, Adrian Klaver wrote: > On 1/15/20 10:18 AM, Konireddy Rajashekar wrote: > > I am getting ERROR: OID out of range while firing below SQL , what could > > be the reason? I am joining pg_class and one user_created table

Re: OID out of range

2020-01-15 Thread Adrian Klaver
On 1/15/20 10:18 AM, Konireddy Rajashekar wrote: I am getting ERROR: OID out of range while firing below SQL , what could be the reason? I am joining pg_class and one user_created table to compare tables size. select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as current_time

OID out of range

2020-01-15 Thread Konireddy Rajashekar
I am getting ERROR: OID out of range while firing below SQL , what could be the reason? I am joining pg_class and one user_created table to compare tables size. select u.relid,c.relnamespace::regnamespace::text,c.relname,now() as current_time,pg_size_pretty(pg_relation_size(c.oid)) as