David Steele wrote
>
> ALTER TABLE requires an exclusive lock - my guess is that another
> process has a lock on the table. It could even be a select.
>
> pg_locks is your friend in this case:
> http://www.postgresql.org/docs/9.4/static/view-pg-locks.html
Hi David
I'm a bit confused on how to
Greg Sabino Mullane wrote
> Disabling triggers requires a heavy lock. A better way is to use
> the session_replication_role feature. See:
>
> http://blog.endpoint.com/2015/01/postgres-sessionreplication-role.html
This is a very effective solution to my problem. Thanks for the tip, Greg.
--
Vi
Hi
Is it possible to do a JOIN between a VIEW and the output of a FUNCTION?
e.g.
I have a function returning a SETOF records (using OUT parameters) with the
following output:
testdb=# SELECT * FROM myfunc( 'AAA1' ); -- returns calculcated values for all
orders for account 'AAA1'
_acc | _
Hi all
I'm doing some maintenance - which is done quite often, never had this
problem before - which requires me to disable triggers, run some updates and
then re-enable the triggers.
Where the whole process normally take 30 sec , it took much longer today and
I cancelled after 5 minutes.
After
HiReferencing https://www.postgresql.org/docs/9.6/static/rowtypes.htmlTaking
a chance here Is there a short-hand way in which I can create a table
with the same structure as a user defined composite type ? E.g.CREATE TYPE
inventory_item AS (nametext,supplier_id integer,
Adrian Klaver-4 wrote
>
> CREATE TABLE inventory_item_table AS ( SELECT some_func( ) limit 0);
Thanks Adrian
My concern is that this will have to execute all code in the function only
to return a empty dataset - his may be ineffective.
A possible workaround will be to have a dedicated param which
Merlin Moncure-2 wrote
> postgres=# create type foo as (a int, b int);
> CREATE TYPE
> postgres=# create table bar of foo;
> CREATE TABLE
> Time: 0.973 ms
Exactly what I needed,
Thanks a lot, Merlin
--
View this message in context:
http://www.postgresql-archive.org/CREATE-TABLE-composite-typ
handle
these ?
(This will be implemented on most object in the catalog e.g. columns,
sequences, functions, etc )
Regards
gmb
--
View this message in context:
http://www.postgresql-archive.org/optimize-pg-tables-query-text-vs-varchar-why-tp5978592.html
Sent from the PostgreSQL - general mailing
s name, t name )* and
the performance turned out pretty well.
I guess, from a "readability" point of view it may be unclear to uninformed
people what a 'name' type actually is ( it was unknown to me until this
morning ), so that may be reason enough to stick with "known&quo
Thanks for this , Tom
--
View this message in context:
http://www.postgresql-archive.org/optimize-pg-tables-query-text-vs-varchar-why-tp5978592p5978654.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql
Hi
Using a Delphi app with ZEOS components to connect to server (on
localhost) and get this message:
SQL Error: invalid encoding name in PGCLIENTENCODING: WIN1252
(Running Windows 7 (64x), postgres 8.3.7)
Initially I installed with server and client encoding as WIN1252. But
since I got the error
Thank for the quick response Tom
> If the message is spelled exactly that way then it's not coming from
> anything in the standard Postgres distribution --- we might say
> "invalid encoding name "something"" but there's noplace that would
> put a reference to PGCLIENTENCODING in the middle. I inf
Seems all that was necessary was a restart of the server :(
...wish I hadn't spend the whole day on this
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
13 matches
Mail list logo