Aha ! A gamer... playing with armor and hit points and things
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Frank Bax
Sent: Tuesday, October 11, 2005 1:06 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] SEVEN cross joins?!?!?
At 08:29 AM 10/1
IMHO: It's not necessarily the job of the RDBMS to be responsible for
formatting and cleaning of your data... This is a job better suited for the
application layer and the data model...
The RDBMS should only be responsible for enforcing constraints on the
data... not validating or purifying the d
There's a difference between "natural" order (the location in the database
or on disk) and "record" order (the order specified by the primary key)...
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Chris Browne
Sent: Wednesday, March 30, 2005 3:04 PM
To
How about a user defined function ???
CREATE OR REPLACE FUNCTION harwareupdate(integer, integer) RETURNS BOOLEAN
AS '
update pieces set p_name = \'LSALES1\', p_location = \'Mike Haley\',
p_site = \'L\' where p_id = $1;
update pieces set p_name = \'SPARE\', p_location = \'spare\', p_
foreign keys and primary keys have to be defined as unique at the table /
column level if you want to implement a check constraint -- your contrived
example doesn't stand up all that well -- If you want to use constraints --
then your database schema should conform to traditional RDBMS theory a
ny leading zeros - I just need to make sure that something "looks"
like a valid SSN in the formattig
(nnn-nn-) and that I can store / retrieve it with the approoriate
format -- what I am really trying to accomplish is an "input mask"...
I hadn't considered using a Doma
000-12-3456'
Either that or the question is: How can I coerce postgreSQL into using an
input / output "mask"...
--
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID 83835
(208) 762-0762
---(end of broadcast)-
;
Table A would have
1, 99
2, 99
..
99,99
and table B would have
1, 1
1, 2
..
1, 99
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID. 83835
(208) 762-0762
Send replies to: [EMAIL PROTECTED]
Website: http://www.left-center.com
-Original M
New feature for posgreSQL 7.3 & later -- sequences are automatically dropped
when the owning table is dropped -- you need to recreate the sequence
The easiest way is in your CREATE TABLE tblName (
id serial PRIMARY KEY,
blah...,
blah...,
) WITH OIDS;
--
Greg Patnude /
IMARY KEY default nextval('nextbz_seq'),
x varchar NOT NULL REFERENCES a(x),
);
--
Greg Patnude / The Digital Demention
2916 East Upper Hayden Lake Road
Hayden Lake, ID 83835
(208) 762-0762
"Bruno Wolff III" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
&
You might be better off with something more like this:
SELECT COUNT(P.*) AS p_count, P.p_product_category_id FROM p_product P
WHERE P.p_product_category_id IN (SELECT DISTINCT id FROM
p_product_category) GROUP BY P.p_product_category_id;
obviously tailored to YOUR schema... not mine...
--
Greg
This seem rather limiting... Suppose I want a trigger that after insert,
returns the currval(sequence) of the newly inserted row automatically
without having to run another query ???
GP
---(end of broadcast)---
TIP 3: if posting/reading throug
I am using postgreSQL with Perl::CGI and Perl::DBI::Pg... I would like to be
able to insert a row from my Perl script [$SQL->exec();] and have postgreSQL
return the id of the newly inserted record (new.id) directly to the Perl
script for further processing... Anyone with a solution / idea ???
Nea
13 matches
Mail list logo