Re: [SQL] How to checking the existance of constraints for a table?

2011-02-04 Thread bricklen
On Wed, Feb 2, 2011 at 12:40 PM, creationw wrote: > > Hello, > > I have a sample table describe as follows, anyone knows how to checking the > existence of a constraint? > > oviddb=# \d myTable > >  Column  |   Type   | Modifiers > -+--+--- >  orderid | smallint | not null

Re: [SQL] using of select (myfunction()).* is so slow

2011-02-04 Thread Gerardo Herzig
El vie, 04-02-2011 a las 12:17 +0100, Pavel Stehule escribió: > >> > > > > M ok Thanks...So there is no workaround/alternative to this? > > > > yes, (SELECT x.* from func(...) x) instead SELECT (func(...)).* > > regards > > Pavel Stehule > > > Gerardo > > > > > Great, i will check that. T

Re: [SQL] using of select (myfunction()).* is so slow

2011-02-04 Thread Pavel Stehule
>> > > M ok Thanks...So there is no workaround/alternative to this? > yes, (SELECT x.* from func(...) x) instead SELECT (func(...)).* regards Pavel Stehule > Gerardo > > -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgres

Re: [SQL] using of select (myfunction()).* is so slow

2011-02-04 Thread Gerardo Herzig
El jue, 03-02-2011 a las 20:47 +0100, Pavel Stehule escribió: > Hello > > If you use a record expansion over function's result, then function is > called once for record's field. > > so don't do it on slow functions. > > Regards > > Pavel > > > 2011/2/3 Gerardo Herzig : > > Hi all, im using a

Re: [SQL] How to workaround DROP CONSTRAINT [ IF EXISTS ] in Postgres version 8.1?

2011-02-04 Thread Viktor Bojović
use function which searches through this tables: -pg_constraint -pg_trigger On Wed, Feb 2, 2011 at 11:21 PM, creationw wrote: > > Hello, > > > I found that DROP CONSTRAINT [ IF EXISTS ] is available in Postgres 9.1 > http://developer.postgresql.org/pgdocs/postgres/sql-altertable.html > http://de