) VALUES (?)|, undef,
q|O'Malley|) or die $DBI::errstr;
$dbh->commit;
By using the '?' placeholder format for statements, you can pass in any
data without having to worry about quoting.
--
Jeff Boes vox 616.226.9550 ext 24
Database Engineer
What version are you using? I think "replace" is new
for version 7.3.
As another poster has pointed out, "translate" works
for individual characters. Or you could code up your
own replace using the native functionality of pl/perl
or pl/tcl or such. Or you could just upgrade to 7.3.
--- Andy Mor
What do these errors mean? I get them on certain databases when trying to view
table data in webmin's postgresql module. I don't think its Webmin specific.
The databases in question are often exported from Access XP using
pgAdmin 1.4.2 and the migration plugin (and imported using psql -f), but I
al
--- jack <[EMAIL PROTECTED]> wrote:
> Hi, all
> I'm using postgreSQL 7.2.3. The following statement
> always cuases a parser
> error, "parse error at or near NOT". Please adivse,
> thank you in advance.
>
> ALTER TABLE _acct_group1
> ALTER groupkey SET NOT NULL;
I believe you will need to u
--- Oliver Vecernik <[EMAIL PROTECTED]> wrote:
> Is there a direct way to import such files into
> PostgreSQL?
>
As I believe others have replied: no, not yet.
If you are absolutely sure that your data will _never_
contain commas, then the simple solution of just
deleting all of the quotes , the
--- william windels <[EMAIL PROTECTED]>
wrote:
> how can I convert sql-code , for microsoft sql
> server 2000, to sql-code for
> postgresql?
>
In addition to the suggestions given in other replies,
have a look at PGAdminII:
http://pgadmin.postgresql.org
That is an excellent utility, and comes wit
Is there a straightforward way to change the display of a time to another
timezone? For example, my server's environment is EST (-0500); I want to
convert timestamps for display in PST (-0800). What I've been doing is to use a
Pl/Pgsql function to subtract the current timezone-offset and add in t
Hi,
I've just upgraded my cygwin to 1.3.20-1 and postgresql to 7.3.2
And I found that when run
postmaster -i &
There are three connections being established and why is that?
Administrator@DemoServer ~
$ LOG: database system was shut down at 2003-02-13 17:33:26 EST
LOG: checkpoint record
UBSCRIBER_NAME" , "B"."ACCOUNT_NUMBER" FROM "B"
>
>
How about a SELECT DISTINCT ON?
SELECT DISTINCT ON (account_number)
subscriber_name, account_number
FROM
(SELECT 1 AS sort_order, subscriber_name, account_number FROM &quo
--- Susan Hoddinott <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Having scoured the relevant documentation I cannot
> find anything which indicates how I simply create a
> database trigger to insert into a second table after
> insert on a first table, without the use of a
> procedure. As I do not want
I believe that if you return NULL from the trigger
function, the delete will not actually be done. You
could set the value of the delete flag by reference to
OLD.fieldname.
I have not actually done this myself, so caveat
emptor.
--- Albrecht Berger <[EMAIL PROTECTED]> wrote:
> Hello,
> I need a
--- Rodger Donaldson <[EMAIL PROTECTED]> wrote:
> On Mon, Jun 16, 2003 at 05:02:34PM -0500, Bu, Ning
> wrote:
>
> > I have a field set up as money and I try to
> calculate some number
> > and put in this field, but the number will be 6
> demical point and I
> > want to cut it to only 2-4 decimal p
--- Josh Berkus <[EMAIL PROTECTED]> wrote:
> Stephan, Tom:
>
> Hey, I have a function which can involve some
> records being deleted at the
> end. The user calling the function has permission
> to delete records (and
> I've tested this), but when I run the function I get
> "permission denied".
--- Rod Taylor <[EMAIL PROTECTED]> wrote:
> On Fri, 2003-09-05 at 00:24, Jomon Skariah wrote:
> >
> > Hi,
> >
> > Thanks for your replys.
> >
> > We are facing another problem now.
> >
> > we need to find an alternative for Oracle's
> ADD_MONTHS in PostGres..
>
> Guessing based on the name th
My SQL is apparently a bit rusty, can anyone advise how to refactor
this updatecharges query to work? I need to update a total-charges field
in my orders table with the sum of the line-item charges in another table.
The tables are related by the orderid column.
Thanks for any help you can provide
t();
Has anything changed to DBI? I haven't found anything on google
suggesting that it has.
--
Jeff Self
Dept. of Information Technology
City of Newport News
(757)926-3741
---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faqs/FAQ.html
Jan Pips wrote:
How to convert the interval type into integer, float or any "countable" data
type at the time of table creation using
select ... into?
I'm guessing you want something like this:
SELECT EXTRACT('EPOCH' FROM INTERVAL
'1 days 4 hours 15 minu
I need to adapt this an update statement to a general
form that will iterate over multiple orderids for a given
customerinvoiceid. My first concern is a form that will
work for a given orderid, then an expanded version that
will work on all orderids with a specific
customerinvoiceid as a parameter.
7.4 uses a completely new regex engine, so comparisons
with that will not be valid anyway.
Pre-7.4 regex behaviour is all documented:
Users Guide -> Functions & Operators -> Pattern
Matching
--- "scott.marlowe" <[EMAIL PROTECTED]> wrote:
> On 24 Oct 2003, Manuel Sugawara wrote:
>
> > Matias Surdi
I need to adapt this an update statement to a general
form that will iterate over multiple orderids for a given
customerinvoiceid. My first concern is a form that will
work for a given orderid, then an expanded version that
will work on all orderids with a specific
customerinvoiceid as a parameter.
Josh Berkus wrote:
> You may only UPDATE one table at a time, you can't update a JOIN. So when
> selecting from another table to filter or calculate your update, the form is:
> UPDATE orderchanges
> SET orderchargesbilled = {expression}
> FROM orders
> WHERE orders.orderid = ordercharges.orderid
--- "Stephen J. Thompson" <[EMAIL PROTECTED]>
wrote:
> But if I use it in a before trigger the procedure
> fails to work.
>
> CREATE OR REPLACE FUNCTION
> staging.write_work_country()
> RETURNS trigger AS
> '
> DECLARE
> alias_rec RECORD;
> BEGIN
> -- Cl
t;a" such that the sum of "b" values
is as close to one-half of the total sum of "b" over all rows. That is,
select 2.0*sum(b) from foo
where a in (...);
would be approximately the same as
select sum(b) from foo;
Likewise,
select 2.0*sum(b) from foo
where a NOT in
I have a test I need to do in my trigger function to see if a standard set
of shipmentcharges exists, if not I insert two rows.
IF (SELECT COUNT(orderchargeid) FROM ordercharges WHERE
orderid=NEW.orderid OR orderid=OLD.orderid)=0 THEN
I added the "OR orderid=OLD.orderid" expression to handle th
Tomasz Myrta wrote:
> You can always check whether your trigger has been fired as insert or
> update trigger.
> DECLARE old_orderid integer;
> BEGIN
>if TG_OP=''UPDATE'' then
> old_orderid=OLD.orderid;
>else
> old_orderid=-1;
>end if;
Thank you, that works well enough. I'
--- Richard Huxton <[EMAIL PROTECTED]> wrote:
> On Friday 09 January 2004 02:13, [EMAIL PROTECTED]
> wrote:
> > Hi,
> >
> >
> > i try to load data from flat file (comma
> delimiter format) into
> > temporary table . i use COPY command as below:
> >
> > dwnc=# copy biosadm.custdo_temp
> > dwnc-#
is error:
WARNING: plpgsql: ERROR during compile of fn_notify near line 5
ERROR: syntax error at or near ""
What gives? Must I use a trigger to get around this?
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer
--- Guy Fraser <[EMAIL PROTECTED]> wrote:
> Kenneth Gonsalves wrote:
>
> >On Tuesday 20 January 2004 19:26, Chris Bowlby
> wrote:
> >
> >
> >>Hi Ken,
> >>
> >> Under 7.3.x this option was removed, you need to
> test via:
> >>
> >> SELECT * from table where field IS NULL;
> >>
> >>
> >thanx -
s:
create table priorities as
select 'LO' as priority, 1 as sort_order
union
select 'N', 2
union
select 'HI', 3;
select * from testtable join priorities using (priority)
order by sort_order;
This last approach is what I've used with code-tables in our system
l_a=;
vs.
EXPLAIN
select * from foobar_table where
col_a=::;
--
~~~~| Genius may have its limitations, but stupidity is not
Jeff Boes | thus handicapped.
[EMAIL PROTECTED] |--Elbert Hubbard (1856-1915), American author
---(end of broadca
--- [EMAIL PROTECTED] wrote:
> Hi ,
>
>
>does postgresql support for the sql loader
> functionality like oracle
> does ??? if no, is there any tools specific to do
> this task connect to
> postgresql database???
> i'm looking into open-source tools that can do
> import & export facility.
>
--- Andrew Sullivan <[EMAIL PROTECTED]> wrote:
> On Tue, Mar 16, 2004 at 03:13:38PM +0530, Kumar
> wrote:
> > Dear Friends,
> >
> > Is possible to import data from MS Excel sheet
> into postgres
> > database 7.3.4 running on Linux 7.2
>
> Yes. I find the easiest way is to export a
> delimited fi
--- Jon Poulton <[EMAIL PROTECTED]> wrote:
> Hi there,
> Im having a go at writing my first set of triggers
> for postgres and Im
> having trouble with an error message which the
> trigger produces when it
> tries to compile/call the function Ive written in
> pgsql. The error message
> is:
>
> ERR
What interface are you using?
--- "Ron M." <[EMAIL PROTECTED]> wrote:
> I'm JUST getting started with the online SQL
> tutorial at
> http://sqlcourse.com. When I create a table and
> insert data, the data
> appears TWICE. A simple example:
>
> ***Create the table:
>
> create table rnmrgntable
>
hat tutorial once upon a time. A very
good thing.
But I don't see the connection to PostgreSQL. Perhaps
you can explain it?
> - Original Message -
> From: "Jeff Eckermann" <[EMAIL PROTECTED]>
> To: "Ron M." <[EMAIL PROTECTED]>;
> <[
e" TRUE, and enough
non-"include" rows to make N. I might end up with more than N rows for a
given value of "query" if there were more than N with "include" set.
I headed off in the direction of groups of SELECTs and UNIONs, and quit
when I got to som
Troels Arvin wrote:
See http://www.acm.org/sigmod/record/issues/0403/index.html#standards for
an article which summarizes the news in SQL:2003.
This is a very useful page; thank you for creating it and for noting it
in this thread!
--
(Posted from an account used as a SPAM dump. If you really wan
s not changing, this will not tell
you anything, even if the user is in fact supplying
the name.
Depending on what rules you want to enforce, you may
be better off doing the checking in your application.
>
> >From: Jeff Eckermann <[EMAIL PROTECTED]>
> >To: Bernard Cheung <[
I have two tables orders and customerpaymentnote, which keep denormalized
columns of the status in rows related by orderid. The column duplication
is intentional, to ease end-user ad-hoc queries. I don't understand the
UPDATE FROM clause at:
http://www.postgresql.org/docs/7.4/static/sql-update.html
--- Bernard Cheung <[EMAIL PROTECTED]> wrote:
> I am writing a trigger function. How can I know
> which fields are being
> updated in the PL/SQL function?
>
> For example I have a table here:
>
>
> CREATE TABLE COMPANY (
> COMPANY_ID VARCHAR(10) NOT NULL,
> NAME VARCHAR(30),
> ADDRESS VA
In the same vein ...
We are at present using BLOBs to store images (but not very many) and generated
output (mostly HTML and XML). The data being stored doesn't require BLOB use
because of size; it's mostly the binary nature of the data.
Lack of satisfaction with the BLOB support (generally diffi
--- Yudie <[EMAIL PROTECTED]> wrote:
> What is isnumeric function in postgresql?
> I'm using psql version 7.2.2
> thanks
> Yudie
I don't think that function is included as such. But
you could do something like:
CREATE FUNCTION isnumeric(text) RETURNS boolean AS '
SELECT $1 ~ ''^[0-9]+$''
' LANG
;^[0-9]+(\\.[0-9]+)?$'').
If you are not familiar with regular expressions,
consider spending a little time learning about them.
They are simply the best way to do pattern matching,
and if you do any amount of text processing at all,
time spent learning will repay you very well.
>
);
This however does not work. the tupple is still deleted from the
table.Any Ideas?
Thanks,
Jeff Post
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
This seems ... well, counter-intuitive at least:
(using Pg 7.4.1)
# select to_char('4 minutes'::interval -
'5 minutes 30 seconds'::interval, 'mi:ss');
to_char
-
-1:-3
(1 row)
Why is the trailing zero lost? Why are there two minus signs?
I would expect '-1:30'.
Likewise,
# select to_char('
I'm just curious - why is it not possible to use the "=" operator to
compare values with NULL? I suspect that the SQL standard specified it
that way, but I can't see any ambiguity in an expression like "AND
foo.bar = NULL". Is it because NULL does not "equal" any value, and the
expression should b
Is there a postgresql SQL idiom to perform an UPDATE, which becomes an
INSERT if the primary key does not exist?
I'm not sure I *should* use it in my application, I just want to know if
it can be done. Thanks.
---(end of broadcast)---
TIP 2: you ca
This feels like a flaw in the way inherited tables work.
I have a "template" table used to create other tables (but not by
inheritance; instead the "daughter" tables are created via
create table draft_00123 as select * from draft_template where false;
This is done for somewhat historical reasons,
--- Joe Conway <[EMAIL PROTECTED]> wrote:
> Devin Whalen wrote:
> > First line:
> > my @active_tables=split(/,/,$tables);
> >
> > Is there anyway to split a variable like the perl
> split above?
>
> I'm no perl guru, but in 7.4 I believe this does
> what you're looking for:
>
> regression=# sele
Hmm, this is puzzling me:
create or replace function fn_foo(text) returns trigger as '
begin
# Do some stuff with $1
end;
' language 'plpgsql';
CREATE FUNCTION
create table bar (aaa text);
CREATE TABLE
create trigger trg_bar
after insert or update on bar
execute procedure fn_foo('string');
ERROR:
Andrew Perrin wrote:
I have a table of people ("reviewers"), a table of review assignments
("assign"), and a table of review acceptances ("accept"). I would like to
be able to write a query to return the latest (e.g., max(assign_date))
assignment for each reviewer, plus the acc_id field from "accep
Ok, how about this. At least it works in my testing.
I have extended it to allow a negative sign (trailing
also), which I would expect to be allowed in a
comprehensive "isnumeric" function. If I am wrong,
feel free to slap me around; although correcting the
regex would be more constructive. ;-)
--- Christopher Browne <[EMAIL PROTECTED]> wrote:
> In an attempt to throw the authorities off his
> trail, [EMAIL PROTECTED] ("Sandeep Gaikwad")
> transmitted:
> > Hello Sir,
> > I want to know how to check
> whether postgres database
> > is running or not ? when I give command
Ugh, never mind. I finally saw the reason in the 'psql' documentation. Missed it
the first time. (And the second, and third, ...)
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nex
why won't variable interpolation work when the "-c" flag is
used?
--
Jeff Boes vox 269.226.9550 ext 24
Database Engineer fax 269.349.9076
Nexcerpt, Inc. http://www.nexcerpt.com
..
--- Kent Anderson <[EMAIL PROTECTED]> wrote:
> I am attempting to use a stored procedure to pull a
> report from the
> database. My questions is if its even possible to
> pull the data using a
> function and then treat the returned data as a
> normal recordset with the web
> pages.
>
> The actua
I have a table with an INSERT/UPDATE/DELETE statement trigger. The
trigger's action is to insert "jobs" into a queue noting that the
table has changed.
A number of other tables have FK relationships with this table, and
they have their own statement triggers that fire on DELETE.
When I delete a n
I have a table with an INSERT/UPDATE/DELETE statement trigger. The
trigger's action is to insert "jobs" into a queue noting that the table
has changed.
A number of other tables have FK relationships with this table, and they
have their own statement triggers that fire on DELETE.
When I delete
--- Rodrigo Carvalhaes <[EMAIL PROTECTED]> wrote:
> Hi !
>
> I am quite confused of the results on a SELECT
> max...
>
> My environment:
> Conectiva Linux 10, PostgreSQL 7.4.6 (compiled from
> the sources)
>
> My problem is the "select max(id) FROM test" the
> result is 20 but the
> right is 1
How are you getting the data from Excel? Perhaps you could use Excel's own
methods to evaluate the cell contents? You may still need to do something
for literal text values (e.g. 'NULL'), though.
"Kieran Ashley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
Apologies if th
?column?
-
2004-02-29 00:00:00
(1 row)
Thus, given the original response to your question:
select * from calendar('1 feb 2004', ( '1 feb 2004'::date +
'1 month'::interval - '1 day'::interval )::date);
--
Jeff Boes
Is there a variable defined that has the schema of the table that called
the trigger (like TG_RELNAME = table name)? I didn't see anything in
the documentation. Is the only way to get that to look it up with TG_RELID?
--
Jeff Hoffmann
[EMAIL PROTECTED]
---(e
being
generated automatically, based on data found in a database.
If I understand you correctly, then this might be useful:
begin;
select now();
\o tmp.tmp
\qecho 'drop type \"foofookitty\";'
\o
\! psql -f tmp.tmp
select now();
commit;
--
Jeff Boes
MS Query is crippled. If you want to do much from Excel, you will need to
write code. But it's not difficult. ADO is a good choice for this.
"gad renert via DBMonster.com" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello, I am a novice with SQL, I have 2 tables
> (transfer
"Muhammad Nadeem Ashraf" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I am new user of PostGreSQL 8.0.1. While using it i faced following issue.
> As SQL is Case insensetive Language So the Uper or Lower cases are not
> significant. But while using the database there is pr
"Zlatko Matiæ" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I am currently migrating from MSDE to PostgreSQL and have to rewrite the
>function that is calculating next date of sampling...
> In MSDE there is a DateAdd function. I can't find the appropriate function
> in postgre.
Forget that message. I need another cup of coffee!
"Jeff Eckermann" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Muhammad Nadeem Ashraf" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Hi,
>> I am new user of
Given a table like this:
create table primary (
a integer primary key,
b boolean
);
And another like this:
create table secondary (
a integer,
some_other_fields
);
I would like a foreign key constraint on the "secondary" table that
looks something like:
foreign key (a, true) reference
lly a "username" constructor, making "jboes" out of "Jeff
Boes"). The odd thing is that function f() also looks into the table
"foo" to see if the value it's constructing is truly unique; if it is
not, it tacks on a "1", "2", etc. until i
Henry Ortega wrote:
> I have the ff table:
>
> id |total| effective|end_date
> john 6 01-01-200502-28-2005
> john 8 03-01-200506-30-2005
>
> How can I return:
> id |total| effective
nori wrote:
> Ok I got it. There is no way to alias all columns of some table with
> some "prefix" that will be visible in result except to alias each
> column.
Only other way would be to write a view for each table, then write all
your queries against the views.
---(end o
Hi,
I'm interested in encrypting an column in table. Are there any example using "C" to create the encrypted column, inserting and retreiving data to/from it?
the table is:
CREATE TABLE mytable ( id SERIAL PRIMARY KEY, crypted_content BYTEA );
I'm getting (null) in the field with t
t; = "0018`0018`64045`08112005`64045`1Discount=0.00;``2``~"
printf("%s", encrypt(data, "foo", "bar"))
prints out (null)
Thank youOwen Jacobson <[EMAIL PROTECTED]> wrote:
Jeff Lu wrote:> Hi,>> I'm interested in encrypting an colum
Hi,
I'm interested in encrypting column in table. Are there any example using "C" to create the encrypted column, inserting and retreiving data to/from it?
Thank you
__Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam protection aroun
The postgres-specific sql extension 'ALTER SEQUENCE' does not appear to support subqueries.
I have inserted some data into a table, including values in the primary
key. I want to reset the associated sequence so that any further
records to be inserted into that table resume numbering
correctly. T
Is there supported syntax to do 'deep' queries? That is where A relates to B relates to C, returning fields from each table?
This doesn't seem to work. Is there a google-able term for this sort of query?
select
foo.aaa,
bar.bbb,
baz.ccc
from
foo,bar,baz
where
foo.bar_id = bar.i
Nevermind. It's late here and I'm not thinking clearly. Problem solved.
would be similar to:
CREATE RULE last_status_change AS ON UPDATE
TO products WHERE NEW.status <> OLD.status
DO UPDATE products SET last_status_change = now() WHERE id = OLD.id;
Except of course that the above is recursive and doesn't work.
How can I do
Tom Lane wrote:
>Jeff Williams <[EMAIL PROTECTED]> writes:
>
>
>>last_status_change timestamp DEFAULT now()
>>
>>
>
>
>
>>What I would like is that whenever the status is changed the
>>last_status_change timestamp is updated to
Stumped: is there any way to set up default values for psql variables
within the .SQL file itself? Obviously, I can do something like:
$ psql -f my_script -v MYVAR=${myvar:-mydefault}
but I would prefer to have the value stored with the .SQL file, e.g. (if
this actually worked):
\set MYVAR COALE
Tony Wasson wrote:
On 1/11/06, Jeff Boes <[EMAIL PROTECTED]> wrote:
Stumped: is there any way to set up default values for psql variables
within the .SQL file itself? Obviously, I can do something like:
$ psql -f my_script -v MYVAR=${myvar:-mydefault}
but I would prefer t
Michael Glaesemann wrote:
>
> On Jan 14, 2006, at 23:54 , Jeff Boes wrote:
>
>> Tony Wasson wrote:
>
>>
>> Sure, but that was not my question. I want to be able to set the
>> variable on the command line, BUT have it default to a value inside
>> the SQL
active='t'),id)
But the above does not appear to exist. Is there a simple way to create a
check constraint for this type of situation, or do I need to create a function
to eval a check constraint?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http:
On Sun, 5 Mar 2006, Michael Glaesemann wrote:
On Mar 5, 2006, at 17:25 , Jeff Frost wrote:
I believe you're looking for what is called a partial index.
http://www.postgresql.org/docs/current/interactive/indexes-partial.html
create unique index foo_partial_idx on foo (id) where a
COMMIT;
After commit, I get a lovely:
ERROR: could not open relation with OID x
Is this expected? To solve this, I simply moved my initial update outside the
transaction.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phon
On Fri, 17 Mar 2006, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
After commit, I get a lovely:
ERROR: could not open relation with OID x
Could we see a complete test case, rather than handwaving? I'd expect
some issues like this if you were using any prepared st
On Fri, 17 Mar 2006, Jeff Frost wrote:
Could we see a complete test case, rather than handwaving? I'd expect
some issues like this if you were using any prepared statements or
plpgsql functions with non-EXECUTEd queries involving the dropped table,
but your description doesn't ment
hanging a NOT NULL constraint. I didn't
think this to be the expected behavior for this query, so I thought I'd post
and see whether I was thinking along the wrong lines. If this is the expected
behavior, then TRUNCATE...ALTER TABLE appears like the way to go in the
future.
Tha
x27;re recreating
(create or replace) that function in that transaction anyway, but perhaps that
needs to happen before the update.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FA
On Fri, 17 Mar 2006, Jeff Frost wrote:
I'll try that and see if that makes the difference, since we're recreating
(create or replace) that function in that transaction anyway, but perhaps
that needs to happen before the update.
I added this at the top of the transaction:
DRO
CONSTRAINT credit_card_audit_account_id_fkey FOREIGN KEY (account_id)
REFERENCES accounts_basics (id) MATCH FULL
ON UPDATE NO ACTION ON DELETE NO ACTION DEFERRABLE INITIALLY DEFERRED
Now that I've got a test case for you guys to look at, I'm off to rewrite our
standard procedure to use TRUNCATE instea
rd and not credit_card_audit. Are you saying that it could cause
this sort of problem even though it doesn't fire?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
atabase
suffers from performance since. For example, a simple query such as
"SELECT MIN(a-primary-key-column) FROM a-table" takes quite a very long
time; actually I gave up before getting the result.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.fro
it should be
(hopefullY) fixed by tomorrow morning.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadcast)---
TIP 6: explain analyze is your friend
remedy the problem. Is postgres logging any errors?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadcast)---
TIP 1: if postin
I have a function that returns a row from a table, e.g.:
create table foo (a integer);
create function f_foo (integer) returns foo language 'sql'
as $foo$
select * from foo where a = $1 limit 1
$foo$
create table bar (b integer);
select * from bar
cross join f_foo(bar.b) as foo;
Unfortunatel
Is there a reasonable way to extract a list of all tables which contain a
specific column name from the system views on 8.1?
For instance, I might want to enumerate all tables with a column named
last_modified.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC
On Fri, 21 Apr 2006, Bruno Wolff III wrote:
On Fri, Apr 21, 2006 at 09:29:33 -0700,
Jeff Frost <[EMAIL PROTECTED]> wrote:
Is there a reasonable way to extract a list of all tables which contain a
specific column name from the system views on 8.1?
For instance, I might want to enumera
X foo_A_B_unique_idx ON foo (A,B);
See the docs here:
http://www.postgresql.org/docs/current/interactive/indexes-unique.html
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
node.net is an *excellent* resource.
>
> Thanks in advance.
>
> Jose
>
regards,
J
--
Jeff MacDonald
Zoid Technologies, http://zoidtechnologies.com/
---(end of broadcast)---
TIP 6: explain analyze is your friend
101 - 200 of 253 matches
Mail list logo