Thanks
I'm having trouble finding any reference to array_out and array_in in
the documentation.
Is there a way to set a different cast for an array?
Regards
On 9 December 2011 15:09, Tom Lane wrote:
> Phil Couling writes:
>> I'm struggling to understand why this cas
Hi
I'm struggling to understand why this casts is not immutable:
integer[]::text[]
text[]::integer[]
The following are all immutable:
integer::text
text::integer
integer[]::float[]
integer::float
I hit on this while trying to make a gin index which cast from one to the other.
Why does the enc
On 14 October 2011 00:49, Steve Crawford wrote:
> On 10/13/2011 04:32 PM, Tom Lane wrote:
>>
>> Phil Couling writes:
>>>
>>> main=> create index foo_next_update on foo( (last_updated +
>>> update_cycle) ) ;
>>> ERROR: functions in index ex
Hi All
I've got a table with (amongst others) two fields:
last_updated timestamp with time zone;
update_cycle interval;
I'd like to create an index on these, to index time "next update" time
(last_updated + update_cycle).
When I try this I get an error though:
main=> create index foo_next_updat
Hi All
I've got a table with (amongst others) two fields:
last_updated timestamp with time zone;
update_cycle interval;
I'd like to create an index on these, to index time "next update" time
(last_updated + update_cycle).
When I try this I get an error though:
main=> create index foo_next_updat
I think you need to get the full list of change dates first. Assuming
you're searching over a time period between "period_from" and
"period_to":
SELECT change_time, sum(diff) as total_diff FROM (
SELECT starttime as change_time, 1 AS diff FROM t WHERE starttime >
period_from AND endtime < period_t
I don't this this is possible as postgres.
There is something simular with:
alter table table_name alter column column_foo using column_bar
But I don't think there's any performance advantage over a simple
update and the using clause doesn't appear to have an equivalent in an
add column statement.
Hi
Dropping the column is a bit drastic if you already have data in there.
You could just set the default on the column:
alter table my_table alter hist_id set default nextval('hist_id_seq')
Also considder setting the sequence owner:
alter sequence hist_id_seq owned by my_table.hist_id;
This w
Hi Adarsh
You say you need this to be done dynamically.
I assume that by this you're looking for a way to have 1 query produce
an increasing number of columns as you increase the number of rows in
your table.
This really isn't possible and doesn't fit with the model SQL was designed for.
The conc
Hi
The method you're using is functionally correct and quite efficient if
a little on the verbose side.
Other non-postgres variants of SQL have a "DECODE" function which
comes in very handy.
I dont believe postgres has any equivalent. (Postgres decode() does
something entirely differnt).
I often
Hi
I'm looking for a way to extract the data from a PostgreSQL 8.3.14
database (cluster) that was built using an an ARM/Linux server. The
problem is that the hardware itself is a brick and the replacement
hardware will be X86/AMD64.
Sadly my backups are all copies of the DB files and don't inclu
Hi
I've just written a search function which creates a temp table, preforms
some reasoning on it returning results then drops it again.
I'm using temp tables in an attempt to gain efficiency (not repeating
work between one section of the function and another).
However I'm worried that there ma
12 matches
Mail list logo