On Wed, 08 Feb 2006 18:34:22 -0800
Ken Hill <[EMAIL PROTECTED]> threw this fish to the penguins:
> On Wed, 2006-02-08 at 21:04 -0500, george young wrote:
>
> > [PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1]
> > I'm designing a completely new schema for my database. A ma
On Wed, 2006-02-08 at 21:04 -0500, george young wrote:
[PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1]
I'm designing a completely new schema for my database. A major
criterion is that it facilitate ad-hoc queries via MS-access, excel and
OpenOffice, presumably with O
This has been something I've been trying do so that I can do some column comparisons as part of "data-cleaning" work. I'll let you know if this helps me accomplish my task!
On Wed, 2006-02-08 at 15:20 -0800, Bricklen Anderson wrote:
[EMAIL PROTECTED] wrote:
> Greetings,
>
> the following is
[PostgreSQL 8.1.0 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 4.0.1]
I'm designing a completely new schema for my database. A major
criterion is that it facilitate ad-hoc queries via MS-access, excel and
OpenOffice, presumably with ODBC.
My question regards the use of UNIQUE constraints inste
Is there a performance trade-off between column indexes and record inserts?
I know that in MS Access there is such a trade-off. This being indexes make SQL queries perform faster at the cost of record insert speed. Put another way, the more column indexes in a table, the slower a record insert
[EMAIL PROTECTED] wrote:
Greetings,
the following is an MySQL statement that I would like to
translate to PostgreSQL:
Could someone point me to a documentation of a coresponding
Systax for an "IF" clause in the a SELECT,
or is the some other way to do this
select
if(spektrum is null,' '
Greetings,
the following is an MySQL statement that I would like to
translate to PostgreSQL:
Could someone point me to a documentation of a coresponding
Systax for an "IF" clause in the a SELECT,
or is the some other way to do this
select
if(spektrum is null,' ','J'),
if(s19 is null,' ','
On Wed, 2006-02-08 at 16:27 -0500, Frank Bax wrote:
At 04:10 PM 2/8/06, Ken Hill wrote:
>I need some help with a bit of SQL. I have two tables. I want to find
>records in one table that don't match records in another table based on a
>common column in the two tables. Both tables have a colu
Ken Hill wrote:
> I need some help with a bit of SQL. I have two tables. I want
> to find records in one table that don't match records in another
> table based on a common column in the two tables. Both tables
> have a column named 'key100'. I was trying something like:
>
> SELECT count(*)
> FRO
Hi, Ken,
Ken Hill schrieb:
> I need some help with a bit of SQL. I have two tables. I want to find
> records in one table that don't match records in another table based on
> a common column in the two tables. Both tables have a column named
> 'key100'. I was trying something like:
>
> SELECT cou
At 04:10 PM 2/8/06, Ken Hill wrote:
I need some help with a bit of SQL. I have two tables. I want to find
records in one table that don't match records in another table based on a
common column in the two tables. Both tables have a column named 'key100'.
I was trying something like:
SELECT co
I need some help with a bit of SQL. I have two tables. I want to find records in one table that don't match records in another table based on a common column in the two tables. Both tables have a column named 'key100'. I was trying something like:
SELECT count(*)
FROM table1, table2
WHERE (tab
Bryce Nesbitt wrote:
> Markus Schaber wrote:
>
> > Bryce Nesbitt wrote:
> >
> >
> >> BEGIN;
> >> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> >> WHERE reservation_id IN
> >> (select reservation_id from reservations where date > magic)
> >> );
> >> DELETE F
Markus Schaber wrote:
> Hi, Bryce,
>
> Bryce Nesbitt wrote:
>
>
>> BEGIN;
>> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
>> WHERE reservation_id IN
>> (select reservation_id from reservations where date > magic)
>> );
>> DELETE FROM isuse WHERE reservation_i
Bryce Nesbitt wrote:
> Owen Jacobson wrote:
>
> > BEGIN;
> > DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> > WHERE reservation_id = reservation_to_delete);
> > DELETE FROM isuse WHERE reservation_id = reservation_to_delete;
> > DELETE FROM reservations WHERE reservati
Hi, Bryce,
Bryce Nesbitt wrote:
> BEGIN;
> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> WHERE reservation_id IN
> (select reservation_id from reservations where date > magic);
> DELETE FROM isuse WHERE reservation_id IN
> (select reservation_id from reserva
Owen Jacobson wrote:
> BEGIN;
> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> WHERE reservation_id = reservation_to_delete);
> DELETE FROM isuse WHERE reservation_id = reservation_to_delete;
> DELETE FROM reservations WHERE reservation_id = reservation_to_delete;
> COMM
Checking how your PgSQL statements are executed, can be done using
EXPLAIN [1].
EXPLAIN ANALYZE will also execute (but not dry-run!) your statement.
I work with a seperate development and production database. Once the
changes to the schema in the development DB are done, I commit them to
the prod
Owen Jacobson wrote:
> BEGIN;
> DELETE FROM note WHERE issue_id IN (SELECT issue_id FROM isuse
> WHERE reservation_id = reservation_to_delete);
> DELETE FROM isuse WHERE reservation_id = reservation_to_delete;
> DELETE FROM reservations WHERE reservation_id =
> reservation_to_delete;
>
BigSmoke wrote:
> ...I'd usually do this by using
> issue_id INTEGER REFERENCES issue ON DELETE CASCADE
>
Good, and valuable, thanks!
But at the moment I can't change the schema. So is there a way to do a
cascaded or joined delete
in a sql schema that did not anticipate it? Again, this is d
Bryce Nesbitt wrote:
> When I delete a record from a certain table, I need to delete a
> (possibly) attached note as well. How can I do this with
> postgres? The
> tables are like this:
>
> reservation
> reservation_id
> stuff...
>
> isuse
> issue_id
> reservation_id
r
Your question is not clear at all.
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cle
I'm not sure if this is true for you as I can't see your complete table
definitions, but I'd usually do this by using
issue_id INTEGER REFERENCES issue ON DELETE CASCADE
in my column definition.
See [1] for more information.
[1]http://www.postgresql.org/docs/current/interactive/ddl-constraint
When I delete a record from a certain table, I need to delete a
(possibly) attached note as well. How can I do this with postgres? The
tables are like this:
reservation
reservation_id
stuff...
isuse
issue_id
reservation_id
stuff..
note
issue_id
text comments...
A s
24 matches
Mail list logo