Jeff Janes wrote
I want to update some data in unique column. Some of the updates would
conflict if applied to eligible rows, and for now I want to skip those
updates, applying only one of a set of conflicting ones. I can use a not
exists subquery to detect when the new value would conflict
I have a key value table in my Postgresql db, which represents hierarchical
data through parent_feature_mapping column that points to id of
feature_mapping_id column of the same table.
I need to select root nodes that has children which satisfy various
conditions. The conditions may extend to
On 05/17/2012 03:06 AM, Seref Arikan wrote:
I have a key value table in my Postgresql db, which represents
hierarchical data through parent_feature_mapping column that points to
id of feature_mapping_id column of the same table.
I need to select root nodes that has children which satisfy
The installer should have an option for 'client only' so you end up with
psql, pg_dump and friends but not the database.
From http://www.postgresql.org/download/windows :
pgInstaller packages are only being maintained for PostgreSQL 8.2 and 8.3.
8.3 pg_dump returns error for 8.4 database.
Chris,
Thank you.
I don't know if you can do that. Why do you need to?
I need to run pg_dump at 2:00 AM every night automatically in Windows
computer where PostgreSql server is not installed.
If you reference the original files (c:\program files\... or where-ever
you installed postgres
Andrus wrote:
Chris,
Thank you.
I don't know if you can do that. Why do you need to?
I need to run pg_dump at 2:00 AM every night automatically in Windows
computer where PostgreSql server is not installed.
The installer should have an option for 'client only' so you end up with
psql,
In some servers 8.4 pg_dump exits without any message if running from Task
Scheduler.
To explore this, I created scheduler task containing line
cmd
After that I can type manually commands:
C:\MyApp\pg_dumpdir /w
..
[.] [..] comerr32.dll
gssapi32.dll k5sprt32.dll
Andrus wrote:
In some servers 8.4 pg_dump exits without any message if running from
Task Scheduler.
To explore this, I created scheduler task containing line
cmd
After that I can type manually commands:
C:\MyApp\pg_dumpdir /w
..
[.] [..] comerr32.dll
gssapi32.dll
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
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
--
Pau
--- 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
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 postgresql?
Using
--- 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
Does the planner automatically add limit 1 to exists sub-selects? In
other words, take an update like:
update foo
set itexists = exists
(select 1 from bar where bar.something = foo.something);
If the sub-select returns a large result set, will there be any benefit
to adding limit 1 to the
Steve Crawford [EMAIL PROTECTED] writes:
If the sub-select returns a large result set, will there be any benefit
to adding limit 1 to the sub-select or does the query planner
automatically deduce that limit 1 is the correct interpretation?
It does, although poking at it I notice a bit of a
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
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
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
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 also
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,
Maileen
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 test it and do
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 :
IF EXISTS
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, i would like to be
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
I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
I've tried replacing (example):
SELECT
name
FROM
people
WHERE
state IN (
SELECT
id
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
SELECT
1
FROM
states
WHERE
name = p.state
)
AND state ~* 'r';
On Tue,
Rory Campbell-Lange wrote:
I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
I've tried replacing (example):
SELECT
name
FROM
people
WHERE
state IN (
SELECT
Rory Campbell-Lange wrote:
I have been informed that at present (postgres 7.3.2) using IN is not
advised, and I should replace it with EXISTS. I can't seem to get it to
work.
...
SELECT
name
FROM
people
WHERE
exists (
SELECT
Why using IN is not advisable???
On 22 Jul 2003 18:36:10 +0200
Csaba Nagy [EMAIL PROTECTED] wrote:
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
SELECT
1
FROM
Actually, even better:
select name
from people p, states s
where p.state = s.name
and p.state ~* 'r';
Cheers,
Csaba.
On Tue, 2003-07-22 at 18:36, Csaba Nagy wrote:
You should use something like:
SELECT
name
FROM
people p
WHERE
exists (
Felipe Schnack wrote:
Why using IN is not advisable???
http://www.postgresql.org/docs/faqs/FAQ.html#4.22
But I believe Tom has fixed this for the upcoming 7.4.
Mike Mascari
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 1: subscribe and
I want to write a function that finds out whether a function already exists.
Is that possible? How?
Thank you all.
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL
On Tue, Sep 25, 2001 at 02:20:23PM -0400, Mihai Gheorghiu wrote:
I want to write a function that finds out whether a function already exists.
Is that possible? How?
select * from pg_proc where proname = ??;
you can run psql with switch -E, then it shows intenal queries
it performs. Eg., for
34 matches
Mail list logo