--- On Tue, 12/11/07, Pau Marc Munoz Torres <[EMAIL PROTECTED]> wrote:
> Thanks, i'll test it tomorrow
OOPS, I just noticed a mistake.
INSERT INTO SP
SELECT a, b
FROM ( VALUES ( 'cesp', 'sp' )) AS tmp( a, b )
LEFT JOIN Sp
ON (Sp.col1,Sp.col2)=(tmp.a,tmp.b)
WHERE (Sp.
Thanks, i'll test it tomorrow
pau
2007/12/11, Richard Broersma Jr <[EMAIL PROTECTED]>:
>
> --- On Tue, 12/11/07, Pau Marc Munoz Torres <[EMAIL PROTECTED]> wrote:
> > could i use a sentence similar to the mysql sentence
> >
> > insert if not exist into SP values
> > ('cesp','sp');
> >
> > in postg
--- On Tue, 12/11/07, Pau Marc Munoz Torres <[EMAIL PROTECTED]> wrote:
> could i use a sentence similar to the mysql sentence
>
> insert if not exist into SP values
> ('cesp','sp');
>
> in postgresql?
Using standard ANSI-SQL the statement could be re-written:
INSERT INTO SP
SELECT a, b
Hello
On 11/12/2007, Pau Marc Munoz Torres <[EMAIL PROTECTED]> wrote:
> could i use a sentence similar to the mysql sentence
>
> insert if not exist into SP values ('cesp','sp');
>
insert into sp
select 'cesp','sp'
except
select * from SP;
Regards
Pavel Stehule
> in postgresql?
>
> pau
>
could i use a sentence similar to the mysql sentence
insert if not exist into SP values ('cesp','sp');
in postgresql?
pau
--
Pau Marc Muñoz Torres
Laboratori de Biologia Computacional
Institut de Biotecnologia i Biomedicina Vicent
Villar
Universitat Autonoma de Barcelona
E-08193 Bellaterr
On 9/21/06, stevethames <[EMAIL PROTECTED]> wrote:
Ok, thanks, Jeff.
This is not a critical problem. Just annoying. I'll wait for 8.2.
BTW, while I can see the reason for adding the IF EXISTS clause to the
language for checking the existence of objects, wouldn't it be easier to
simply provide
Ok, thanks, Jeff.
This is not a critical problem. Just annoying. I'll wait for 8.2.
BTW, while I can see the reason for adding the IF EXISTS clause to the
language for checking the existence of objects, wouldn't it be easier to
simply provide the PL/PgSQL language for script loading? Then it wo
On Wed, Sep 20, 2006 at 04:12:16PM -0700, Jeff Davis wrote:
> In 8.2, which is currently still in production, they have added the
> feature where you can do things like:
>
> DROP SEQUENCE IF EXISTS mysequence;
> CREATE SEQUENCE mysequence;
>
> Which makes writing SQL scripts much easier. They al
On Wed, 2006-09-20 at 14:18 -0700, stevethames wrote:
> I have a script that sets up my databases which I run whenever I change any
> of the functions. It has a number of things it does that are unnecessary
> and cause errors. I create some types, sequences, etc. The error messages
> are irritat
I have a script that sets up my databases which I run whenever I change any
of the functions. It has a number of things it does that are unnecessary
and cause errors. I create some types, sequences, etc. The error messages
are irritating. I'd like to do something like this:
IF NOT EXISTS (SEL
How about if exists (select .. from ..)
On 11/14/05, Jaime Casanova <[EMAIL PROTECTED]> wrote:
> On 11/14/05, P.M <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I would like to know if "IF EXISTS" exists under
> > postgresql ?
> > because i did not find it.
> >
> > before to create users or database,
On 11/14/05, P.M <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to know if "IF EXISTS" exists under
> postgresql ?
> because i did not find it.
>
> before to create users or database, i would like to be
> sure that they do not exist already.
>
> so how can i test it and do something like :
>
> I
On Mon, Nov 14, 2005 at 13:20:59 -0800,
"P.M" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I would like to know if "IF EXISTS" exists under
> postgresql ?
> because i did not find it.
>
> before to create users or database, i would like to be
> sure that they do not exist already.
>
> so how can i tes
Hi,
I would like to know if "IF EXISTS" exists under
postgresql ?
because i did not find it.
before to create users or database, i would like to be
sure that they do not exist already.
so how can i test it and do something like :
IF EXISTS database "test" DROP database "test";
thanks a lot,
Ma
Hi all
Can I make something linke:
IF EXISTS(company_id_seq)
DROP SEQUENCE company_id_seq;
in a DDL where i creates all my tables?
/Henrik
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
15 matches
Mail list logo