The second example you gave worked for me. Thanks Carla !
D. Jeff Bland
z/OS System House Installation and Packaging (zSHIP)
BLAND at IBMUS
bl...@us.ibm.com
http://w3.pok.ibm.com/zos/i95a/
845-435-42108/295-4210
Famous quote: Beauty is in the eye of the beer holder.
From:
Carla
To
I want to delete certain rows from table USER_TBL.
Two tables are involved. USER_TBL and OWNER_TBL.
The entries that match BLAND type in OWNER table and who also have a
matching entry in USER table NAME but only for USER_TBL entries with
places equal to HOME.
DELETE FROM SP.TST_USER_TBL WH
INNER JOIN Orders O ON C.CustomID=O.CustomID
WHERE C.Name LIKE '%' || input || '%';
RETURN $1;
END
$$ LANGUAGE plpgsql;
Then to use:
BEGIN;
SELECT test('curs', );
FETCH ALL FROM curs;
END;
Jeff
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql
On Wed, 5 Mar 2008, Osvaldo Rosario Kussama wrote:
Jeff Frost escreveu:
I've got an interesting one...I'm trying to find columns that have three or
fewer distinct characters (for example, "aa"). Wondering if I need
to write a function or if someone has an idea how
thing to do would be to lowercase everything, then remove all
duplicate chars and spaces, then use length() on that, but it's not obvious to
me how I might remove the duplicate chars with the pattern matching support
in the docs.
--
Jeff Frost, Owner <[EMAIL PROTECTED]&g
('select * from
someFooTypeReturningFunc()') as t1(col text, )
I could write select * from dblink('select ... ') as t1(footype)
I've poked over the docs and googled around, haven't seen anything yet.
--
Jeff Trout <[EMAIL PROTECTED]>
http:/
doesn't hurt anything, I'm just curious why it skips one after
every generate_series insert?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(
On Sun, 17 Jun 2007, Jeff Frost wrote:
On Mon, 18 Jun 2007, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
[ umpteen million iterations of: ]
-> Limit (cost=0.00..367.09 rows=1 width=8)
-> Index Scan Backward using page_view_
On Sun, 17 Jun 2007, Jeff Frost wrote:
-
Seq Scan on page_view pv1 (cost=0.00..11529031.34 rows=3580205 width=239)
SubPlan
-> Result (cost=1.58..1.59 r
On Mon, 18 Jun 2007, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
[ umpteen million iterations of: ]
-> Limit (cost=0.00..367.09 rows=1 width=8)
-> Index Scan Backward using page_view_stamp_idx on
page_view pv2 (cost=0.00..158215
explain analyze output yet.
Does anyone have a better method of separating this data out?
---
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadcast)
That works like a charm. Thanks, Alvaro!
-Jeff
-Original Message-
From: Alvaro Herrera [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 08, 2007 1:22 PM
To: Demel, Jeff
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] COPY FROM - force a value
Demel, Jeff wrote:
> Is there a way
LIMITER AS ' ',
forcevalue1 = 1,
forcevalue2 = 'this value'
;
TIA
-Jeff
This email is intended only for the individual or entity to which it is
addressed. This email may contain information that is privileged, confidential
or otherwise protected from disclosure. Dissem
;t have to juggle users, permissions, and settings.
-Jeff
-Original Message-
From: Richard Huxton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 08, 2007 3:06 AM
To: Demel, Jeff
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] metaphone and nysiis in postgres
Demel, Jeff wrote:
>
Can this be installed easily on Windows?
-Jeff
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Demel, Jeff
Sent: Wednesday, February 07, 2007 2:13 PM
To: pgsql-sql@postgresql.org
Subject: Re: [SQL] metaphone and nysiis in postgres
Ah! Cool. Contrib
Ah! Cool. Contrib/fuzzystrmatch has metaphone. Looks like it has
soundex and levenschtein too.
Thanks!
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 07, 2007 2:09 PM
To: Demel, Jeff
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] metaphone and
Microsoft SQL server has two extended stored procedures that I need in
Postgres: xp_nysiis and xp_metaphone. They do fuzzy matching on strings. Are
there Postgres alternatives for these? Or maybe some other way to do
phonetic/fuzzy matching that would be as effective?
-Jeff
-Original
t; I haven't gotten there yet, but I'm also wondering if the
> SCOPE_IDENTITY() method is going to work or not.
I doubt it. What does it do?
It returns the id of the record just inserted.
-Jeff
This email is intended only for the individual or entity to which it is
addressed.
o, I'm wondering if NOCOUNT is supported in Postgres at all. If it's
not, what's the alternative? If it is, what is wrong with my syntax?
I haven't gotten there yet, but I'm also wondering if the
SCOPE_IDENTITY() method is going to work or not.
TIA
-Jeff
This email is in
On Tue, 23 Jan 2007, Josh Williams wrote:
From: Jeff Frost <[EMAIL PROTECTED]>
On Mon, 22 Jan 2007, Richard Ray wrote:
...
That's definitely part of it. I'm assuming the above is an abridged example
and the OP is doing something dynamic with the query. The real trouble i
On Mon, 22 Jan 2007, Richard Ray wrote:
On Mon, 22 Jan 2007, Jeff Frost wrote:
So why are you avoiding "SELECT * FROM t1;" ?
I was affeared that if I brought my total ignorance to light I would be band
from the list but here goes.
I work in UNIX/Linux environments.
It's my
pg_class where relname = 't1') and attisdropped = false and attnum > 0)
is a substitute for *
On Mon, 22 Jan 2007, Jeff Frost wrote:
Perhaps I should have asked this earlier. What information are you trying
to extract?
On Mon, 22 Jan 2007, Richard Ray wrote:
This is not exactly what
Perhaps I should have asked this earlier. What information are you trying to
extract?
On Mon, 22 Jan 2007, Richard Ray wrote:
This is not exactly what I need
I want to return the data in t1
On Mon, 22 Jan 2007, Jeff Frost wrote:
I think this is what you're looking for Richard:
S
e row returned by a subquery used as an expression
Thanks
Richard
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://
You will need to manually remove the postgresql folder under Program files
because uninstalling does not remove that folder for you.
- Original Message
From: Penchalaiah P. <[EMAIL PROTECTED]>
To: pgsql-sql@postgresql.org
Sent: Sunday, December 3, 2006 5:33:41 AM
Subject: [SQL] hi any o
Michael,
I think you may have solved my problem. We're still experimenting with it but I
think setseed is going to work. Thank you very, very much!
Jeff Herrin
- Original Message -
From: Michael Fuhr <[EMAIL PROTECTED]>
To: Jeff Herrin <[EMAIL PROTECTED]>
Cc: Andreas K
I don't think cursors are going to help in this case. The order by random() is
still going to give different result sets on different pages.
Jeff
- Original Message -
From: Andreas Kretschmer <[EMAIL PROTECTED]>
To: pgsql-sql@postgresql.org
Sent: Wednesday, November 29, 2006
I need it a little more random than that. In both these scenarios, the same
items will always follow each other.
Jeff
- Original Message -
Why not create a random seed between 1 and the number of possibilities in your
web application when a user first hits the site, store that in
random set. That way, when I get to the 2nd page, i know i'm getting the
dataset back in the same order that I had on page 1, and the offset works like
normal. Is this even realistically possible?
Thanks,
Jeff Herrin
On Tue, 7 Nov 2006, Jeff Frost wrote:
Well, it's been working wonderfully since the REINDEX, so I don't know what
to say. Any idea if having a too small max_fsm_pages could hose an index,
because I know that happened not too long before we started seeing this
problem. The fsm set
rring, but
it's possible the index was already damaged?
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadcast)---
TIP 3
On Fri, 3 Nov 2006, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
Well, I spoke to soon on the it all works front. So, it's been
reindexed and appears to be working properly now. I guess I'll keep
an eye on it for a while. I didn't get your query suggestion in
On Fri, 3 Nov 2006, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
BTW, just to make sure I get the right file to ship over if we have this
again, it would be: /var/lib/pgsql/data/base/9366228/16204210 yes?
Not necessarily --- the filename is initially the same as the index OI
On Fri, 3 Nov 2006, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
On Thu, 2 Nov 2006, Tom Lane wrote:
This seems pretty darn weird. I am wondering about corrupt indexes ---
can you find the indicated key in either table if you set
enable_indexscan and enable_bitmapsca
On Thu, 2 Nov 2006, Tom Lane wrote:
Jeff Frost <[EMAIL PROTECTED]> writes:
delete from visit where id not in (select distinct visit_id from page_view);
This yields the following error:
ERROR: update or delete on "visit" violates foreign key constraint
"fk34afd255fb
On Thu, 2 Nov 2006, Jeff Frost wrote:
I'm having problem with a cleanup script that runs nightly. The script calls
the following query:
delete from visit where id not in (select distinct visit_id from page_view);
This yields the following error:
ERROR: update or delete on "visit
;page_view_visit_idx" btree (visit_id)
Foreign-key constraints:
"fk34afd255fbacabec" FOREIGN KEY (visit_id) REFERENCES visit(id)
What kind of silliness am I forgetting?
--
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
up on filesystem maintenance/tweaking...
Scott Marlowe wrote:
I can't tell you the number of times that little trick has saved my
life.
On Thu, 2006-07-27 at 11:32, Jeff Frost wrote:
You can probably just "tune2fs -m 0 " to give yourself enough
space to get out of the jam before yo
one
who set up this box and there has been virtually no administration or
maintenance on it that I know of...) How about the WAL files in pg_xlog?
How critical are they when no data on the system is critical in and of
itself? Any suggestions would be greatly appreciated...
--
Je
terminated:
Daniel,
I would guess this is more appropriate for the -admin list so I cc'd it.
I think you are most likely running out of memory or running up against a
ulimit on memory. I would first check my ulimit settings on the postgres user
and see if they are a bit small.
--
Jeff
last 30 items per each account_id...so each account_id will have his last 30
messages in the table.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadc
27;t be too bad.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingllc.com/
Phone: 650-780-7908 FAX: 650-649-1954
---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will
#x27;s no way to get around the subselect
though.
--
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
elect id from log
where account_id = 1 order by timestamp desc limit 30);
I'm wondering if there is a more performance oriented method of doing the
delete that I'm not thinking of.
--
Jeff Frost, Owner <[EMAIL PROTECTED]>
Frost Consulting, LLC http://www.frostconsultingll
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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:
ething else' end
as blah, public.Z_documents as d ...
--
Jeff Trout <[EMAIL PROTECTED]>
http://www.jefftrout.com/
http://www.stuarthamm.net/
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
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
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
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
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
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
Nevermind. It's late here and I'm not thinking clearly. Problem solved.
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
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
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
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 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
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
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
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
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
it only runs on linux and it must run on the same box as pg itself.
You may want to look at it and see if you can get anything good out
of it.
queries / second is tricky. You could look at my pgspy utility but
it is in C. It can give you queries / second data
--
Jeff Trout <[EMAI
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
"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.
"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
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
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
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
?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
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
--- 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
On Nov 3, 2004, at 10:56 AM, Ameen - Etemady wrote:
I like to do it like this:
create table mytmp(name myvarchar(10,"en_US"));
you can't unless you modify the parser.
It has special cases to support varchar (and numeric) syntax.
--
Jeff Trout <[EMAIL PROTECTED]>
http://ww
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
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
--- 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
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
..
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
--- 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
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. ;-)
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
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:
--- 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
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,
1 - 100 of 253 matches
Mail list logo