On Friday, November 11, 2016, Andreas Brandl wrote:
> Hi,
>
> we have a pretty big table with an integer-type primary key. I'm looking
> for the quickest way to change the column type to bigint to avoid hitting
> the integer limit. We're trying to avoid prolonged lock situations and full
> table
Andreas Brandl writes:
> we have a pretty big table with an integer-type primary key. I'm looking for
> the quickest way to change the column type to bigint to avoid hitting the
> integer limit. We're trying to avoid prolonged lock situations and full table
> rewrites.
You have no choice. Tho
Hi,
we have a pretty big table with an integer-type primary key. I'm looking for
the quickest way to change the column type to bigint to avoid hitting the
integer limit. We're trying to avoid prolonged lock situations and full table
rewrites.
I know I can hack this with an UPDATE on pg_attribu
On 11/11/2016 12:55 AM, Marc Mamin wrote:
Hello,
It is possible to cast a row to text, but is there a way to revert that?
e.g.:
create temp table test like pg_class;
WHITH dummy as (SELECT (c.*)::text t from pg_class c limit 10)
INSERT INTO test
SELECT ???
FROM dummy;
an other option that w
Marc Mamin writes:
> It is possible to cast a row to text, but is there a way to revert that?
Well, you can surely cast it back to the rowtype, but I think that answer
doesn't really help you. What you seem to need is not casting to a
rowtype, but "bursting" the rowtype variable into individual
Hello,
It is possible to cast a row to text, but is there a way to revert that?
e.g.:
create temp table test like pg_class;
WHITH dummy as (SELECT (c.*)::text t from pg_class c limit 10)
INSERT INTO test
SELECT ???
FROM dummy;
an other option that would sometimes help me would be to cast rows