On Monday, January 09, 2012 8:28:43 am Tony Capobianco wrote:
> I see what you're saying:
>
> pg=# select tablename from pg_tables where tablename like 'tmp_staging%'
> and tablename < 'tmp_staging1230' and tablename > 'tmp_staging1228';
> tablename
>
> tmp_staging1229
>
>
On 01/09/2012 08:28 AM, Tony Capobianco wrote:
I see what you're saying:
pg=# select tablename from pg_tables where tablename like 'tmp_staging%' and
tablename< 'tmp_staging1230' and tablename> 'tmp_staging1228';
tablename
tmp_staging1229
This query is part of a
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> tmp_staging1229
>
> This query is part of a larger script where I want to dynamically select
> tablenames older than 10 days and drop them. The tables are created in
> a tmp_stagingMMDD format. I know postgres does not maintain object
> crea
On Monday, January 09, 2012 8:12:18 am Tony Capobianco wrote:
> tablename
>
> tmp_staging0109
> tmp_staging1229
> tmp_staging0108
>
> How can I write this correctly?
Had another idea. If you are looking for the highest numbered table below a
certain number then mayb
I see what you're saying:
pg=# select tablename from pg_tables where tablename like 'tmp_staging%' and
tablename < 'tmp_staging1230' and tablename > 'tmp_staging1228';
tablename
tmp_staging1229
This query is part of a larger script where I want to dynamically se
On Monday, January 09, 2012 8:12:18 am Tony Capobianco wrote:
> I have these 3 tables:
>
> tablename
>
> tmp_staging0109
> tmp_staging1229
> tmp_staging0108
>
>
> I'd like this query:
>
> select tablename from pg_tables where tablename like 'tmp_staging%' and
> tabl
I have these 3 tables:
tablename
tmp_staging0109
tmp_staging1229
tmp_staging0108
I'd like this query:
select tablename from pg_tables where tablename like 'tmp_staging%' and
tablename < 'tmp_staging1230';
To return this result:
tablename