Hello,
I'm new to Pg and exploring its advanced functionalities for a project.
I find composite type very interesting, but what are problems/limitations ?
I'd want to create this structure for example:
Phone
Nom du champ
Type
Accès
Clef
Commentaire
typ_tel
integer
type téléphone (liste 25)
tel
On Thu, Jan 26, 2012 at 2:12 AM, panam wrote:
> CREATE TABLE tbl (ID bigint default nextval('global_seq') primary key,foo
> varchar,bar varchar); --in public schema
> CREATE TABLE schema1.tbl (LIKE public.tbl INCLUDING ALL); --draws ids from
> sequence in public schema
> CREATE TABLE schema2.tbl
Hello Guys,
In the past I had a view defined as follows
CREATE view abcd as
SELECT whatever .. --- query1
Some business requierments came up and I had to change it like this
CREATE view abcd as
SELECT whatever .. --- query1
UNION
SELECT whatever .. query2
Now I have
Hi,
Is it possible to do the equivalent of let-bindings in a pure SQL function?
I have a SELECT that invokes "now" multiple times. It would be nicer
to do it only once and reuse the value. Something like this:
LET right_now = SELECT now () IN
SELECT * FROM my_table WHERE right_now >= start AND
On 26 January 2012 15:37, Jon Smark wrote:
> Hi,
>
> Is it possible to do the equivalent of let-bindings in a pure SQL function?
> I have a SELECT that invokes "now" multiple times. It would be nicer
> to do it only once and reuse the value. Something like this:
>
> LET right_now = SELECT now (
salah jubeh wrote:
Hello Guys,
In the past I had a view defined as follows
CREATE view abcd as
SELECT whatever .. --- query1
Some business requierments came up and I had to change it like this
CREATE view abcd as
SELECT whatever .. --- query1
UNION
SELECT whatever .. query2
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Jon Smark
Sent: Thursday, January 26, 2012 9:38 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Let-bindings in SQL statements
Hi,
Is it possible to do the equivalen
Sorry, The scenario, that I posted was not correct. I have traced it and the
union was not the problem, As I said the query excusion plan is over 5000 line.
I have created a scenario which similar to the scenario causes the problem I
have.
CREATE TABLE TEST (
ID SERIAL PRIMARY KEY,
COL1 TEXT
On Thu, Jan 26, 2012 at 3:22 AM, Leguevaques Alex
wrote:
>
> Hello,
> I'm new to Pg and exploring its advanced functionalities for a project.
> I find composite type very interesting, but what are problems/limitations ?
> I'd want to create this structure for example:
Composite types add a little
On Thu, 26 Jan 2012 06:37:49 -0800 (PST), Jon Smark wrote about
[GENERAL] Let-bindings in SQL statements:
>Is it possible to do the equivalent of let-bindings in a pure SQL
>function? I have a SELECT that invokes "now" multiple times. It would
>be nicer to do it only once and reuse the value. So
salah jubeh writes:
> Sorry, The scenario, that I posted was not correct. I have traced it and the
> union was not the problem, As I said the query excusion plan is over 5000
> line. I have created a scenario which similar to the scenario causes the
> problem I have.
> [ query uses EXCEPT no
Thanks, yeah, but the dummy tables are needed anyway in my case for those
entities that are shared among the tenants :)
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Best-way-to-create-unique-primary-keys-across-schemas-tp5165043p5433562.html
Sent from the PostgreSQL -
On Thu, Jan 26, 2012 at 3:37 PM, Jon Smark wrote:
> Hi,
>
> Is it possible to do the equivalent of let-bindings in a pure SQL function?
> I have a SELECT that invokes "now" multiple times. It would be nicer
> to do it only once and reuse the value. Something like this:
>
> LET right_now = SELEC
In order to do some complex calculations I have joined several views.
Each view could join quite a few tables.
The user is allowed to filter the results with several multi-select
input fields and this is used in the query as where a.id in
(:listOfIds).
This works fine if the user does not filter
Hi list,
Given an 'applications' table for a static set of courses::
user_id (integer)
course_name (text)
completed (boolean)
how best should I go about creating an 'alumni' view with columns:
user_id (integer)
maths (boolean)
english (boolean)
. .
. .
. .
w
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sebastian Tennant
Sent: Thursday, January 26, 2012 6:55 AM
To: pgsql-general@postgresql.org
Subject: [GENERAL] Help needed creating a view
Hi list,
Given an 'applications'
Hello.
PostgreSQL 8.4. I am trying to create a trigger which removes "old" rows
from the table just before inserting a new one. The table has an UNIQUE
INDEX on a column, that's why I need to remove an old item with the same
value of the column before inserting a new one.
If I work without transa
Hello ,
if you need to construct view with the columns math, physics , I think what
you need is crosstab function
Regards
From: David Johnston
To: 'Sebastian Tennant' ; pgsql-general@postgresql.org
Sent: Thursday, January 26, 2012 8:50 PM
Subject: Re: [G
On Fri, Jan 27, 2012 at 4:56 AM, panam wrote:
> Thanks, yeah, but the dummy tables are needed anyway in my case for those
> entities that are shared among the tenants :)
Ah! Then that's easy :)
ChrisA
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
PG V9.0.1 on Linux
I want to temporarily prevent users from connecting to a DB, let the existing
connections finish, , re-enable connections.
What's the best way to do that?
Thanks in Advance
Quote:
==
This thread
http://postgresql.1045698.n5.nabble.com/Multithread-Query-Planner-td5143643.html
was mentioned in a performance sub-group posting. Give it a read.
Back? It means, so far as I can see, that PG is toast. It
On Thu, Jan 26, 2012 at 3:05 PM, Gauthier, Dave wrote:
> PG V9.0.1 on Linux
>
>
>
> I want to temporarily prevent users from connecting to a DB, let the
> existing connections finish, , re-enable connections.
>
> What's the best way to do that?
Edit pg_hba.conf to reject all connections and reloa
I found something else on the web.
update pg_database set datallowconn = false where datname = 'foo';
update pg_database set datallowconn = true where datname = 'foo';
Seems to have worked OK.
Thanks for the pg_hab.conf suggestion. I'll add that to my notes.
-Original Message-
Fro
On Thu, Jan 26, 2012 at 3:55 PM, Gauthier, Dave wrote:
> I found something else on the web.
>
> update pg_database set datallowconn = false where datname = 'foo';
> update pg_database set datallowconn = true where datname = 'foo';
>
> Seems to have worked OK.
>
> Thanks for the pg_hab.conf suggest
On Thu, Jan 26, 2012 at 3:52 PM, Rodrigo E. De León Plicet
wrote:
> Quote:
>
> ==
>
> This thread
>
> http://postgresql.1045698.n5.nabble.com/Multithread-Query-Planner-td5143643.html
>
> was mentioned in a performance sub-group po
Rodrigo E. De León Plicet wrote on 26.01.2012 22:52:
Oracle claims it for releases going back to 7
Not true.
Quote from the Oracle concepts manual:
"Multiple-process Oracle (also called multiuser Oracle) uses several processes to
run different parts of the Oracle Database code and additional
On Thu, Jan 26, 2012 at 3:02 PM, Merlin Moncure wrote:
> On Thu, Jan 26, 2012 at 3:52 PM, Rodrigo E. De León Plicet
> wrote:
> > Quote:
> >
> > ==
> >
> > This thread
> >
> >
> http://postgresql.1045698.n5.nabble.com/Multithread
I think in my case, It is safe to push the predicate down. Can someone please,
examine the behavior of other databases.If it behaves like postgres, I will
assume there are some cases where it can lead to wrong result set. I tried SQL
server but my windows refuses it :-)
Regards
___
On Thu, Jan 26, 2012 at 3:18 PM, Thomas Kellerer wrote:
> Rodrigo E. De León Plicet wrote on 26.01.2012 22:52:
>
> Oracle claims it for releases going back to 7
>>
>
> Not true.
>
> Quote from the Oracle concepts manual:
>
> "Multiple-process Oracle (also called multiuser Oracle) uses several
>
Hello,
A client of ours has always had problems with slow internet connectivity - they
are in a part of the country where that is a problem. There are a few hundred
staff sharing a couple of asymmetric (ADSL) connections. One issue is with
accessing their web-based Postgres app, which we host.
On Thu, Jan 26, 2012 at 3:58 PM, Scott Marlowe wrote:
> On Thu, Jan 26, 2012 at 3:55 PM, Gauthier, Dave
> wrote:
>> I found something else on the web.
>>
>> update pg_database set datallowconn = false where datname = 'foo';
>> update pg_database set datallowconn = true where datname = 'foo';
>>
I wrote:
> Hmm. The code explicitly won't push conditions down through an EXCEPT:
> * 3. If the subquery contains EXCEPT or EXCEPT ALL set ops we cannot push
> * quals into it, because that could change the results.
> I remember coming to the conclusion that this is safe for
> UNION/INTERSECT bu
Jason Long writes:
> In order to do some complex calculations I have joined several views.
> Each view could join quite a few tables.
> The user is allowed to filter the results with several multi-select
> input fields and this is used in the query as where a.id in
> (:listOfIds).
> This works f
33 matches
Mail list logo