Well, maybe if Postgres' name was Mostgres, the "M"
would stand for Mostgres instead of MySQL ...
V.Paul
clayton cottingham wrote:
>
> heya:
> just wondering if anyone has any comments on this
>
> onlamp is o'rielly's new ideal
> that ,really, has been in use for quite a while
>
> its anacro
My apologies to the lists...in trying to stop my own spam, I spammed you all.
This has now been fixed.
Again, sorry for any inconvenience.
-Ken
if join database1 database2how to makeI use VB
or DELPHIthanks
thanks
When dumping database, is it possible to dump datetime values without
the timezone info?
I'm currentlyl using 6.5.
Even a PL/PgSQL FAQ would be good.
> mark proctor writes:
>
> > I've been trawling through the mailist lists and I notice there was
> > talk back in 1999 abouta PLPGSQL Cook Book - did anything come of
> > this? If no one is maintaining something like this and people think
> > its a good idea I
mark proctor writes:
> I've been trawling through the mailist lists and I notice there was
> talk back in 1999 abouta PLPGSQL Cook Book - did anything come of
> this? If no one is maintaining something like this and people think
> its a good idea I think we should have another crack at it. I'd be
On Tue, Feb 13, 2001 at 10:20:09AM -0500, Najm Hashmi wrote:
> Hi All,
hi
> I am trying to define a new set of tables an I am getting this strange
> syntex problem on date, or timestamp data types. I am also getting error on
> not null constranit as well... Postgres is behaving strangely fi
"K. Ari Krupnikov" <[EMAIL PROTECTED]> writes:
> CREATE FUNCTION foo (INT)
> RETURNS SETOF INT AS '
> SELECT id
> FROM table
> WHERE some_colunm > $1
> ORDER BY some_other_colunm
> ' LANGUAGE 'sql';
> ERROR: function declared to return int4 returns multiple values in
> final r
Tcl is my bread and butter but, coincidentally, I have just started considering
pl/tcl 2 days ago as the choice for server side pg programming. I do it in
microsoft t-sql right now, and plsql is pretty close to that. However, tcl is
like English to me, so I think I will go that way unless someon
Are ORDER BYs allowed in SQL functions? Or do SQL functions work like
views that are as unordered as their underlting tables?
CREATE FUNCTION foo (INT)
RETURNS SETOF INT AS '
SELECT id
FROM table
WHERE some_colunm > $1
' LANGUAGE 'sql';
works. But if I try
CREATE FUNCTION foo (IN
the select query returns the first row to rec. You can then access its values with:
rec.field_name
at END LOOP it jumps back to FOR checks to see if there any more rows and if so moves
to the next row and repeats the loop.
It also looks like your missing a LOOP keyword at the end of the FOR line
Ahh I found what I was doing wrong, there was a rogue value being returned causing to
infinite loop. Its fixed now.
Creating that script you recommended set my thinking process straight.
many thanks
Mark
On Saturday 10 February 2001 08:42, Tom Lane wrote:
> mark proctor <[EMAIL PROTECTED]> wr
If I remove the line calling PERFORM it works without problems moving the children
node for the passed integer into test and then exiting.
I can then repeat the process going through the output to test iteratively and do not
have any problems.
However if I put the PERFORM line back in to create
Frank Morton writes:
> These two queries get me what I want from each table:
>
> select unique id from table1 where lastname='morton';
> select unique id from table2 where ((type = "pie") and (content = 'apple));
>
> What is the best way to combine these into one query?
select table1.id from tab
Jie LIANG
St. Bernard Software
Internet Products Inc.
10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873
[EMAIL PROTECTED]
www.stbernard.com
www.ipinc.com
On Mon, 12 Feb 2001, Frank Morton wrote:
> I'll really appreciate help on this if anyone will do so. I'm
> u
I'll really appreciate help on this if anyone will do so. I'm
used to single-table stuff, but not sure the best way to
do things with multiple tables, but here goes:
Given two tables with a common "id" field, first table columns:
id
lastname
Second table columns:
id
type
content
These two que
heya:
just wondering if anyone has any comments on this
onlamp is o'rielly's new ideal
that ,really, has been in use for quite a while
its anacronym stands for
linux apache mysql and {php/perl/python}
more info here:
http://www.onlamp.com/
Michael Ansley <[EMAIL PROTECTED]> writes:
> I thought that the discussion on this topic resolved that the AS syntax
> would work as I described, and the INTO syntax would be removed because of
> ambiguity, to be redeveloped at a later date?
INTO has indeed been removed. However, AS does not do
Michael,
> I thought that the discussion on this topic resolved that the AS
> syntax would work as I described, and the INTO syntax would be removed
> because of ambiguity, to be redeveloped at a later date?
*
Tom (I believe) was referring to CREATE TABLE AS as a way to i
Tom,
> > (and keep in mind
> > that Postgres functions currently have trouble with NULLS as
> > input parameters).
>
> Not in 7.1 they don't ...
Really? Terrific. Sadly, I have 25+ PL/pgSQL functions not set up to
accept NULLs ...
Can you point me to (or tell me where to search) the developer
Title: RE: [SQL] plpgsql grief
I thought that the discussion on this topic resolved that the AS syntax would work as I described, and the INTO syntax would be removed because of ambiguity, to be redeveloped at a later date?
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]]
Rob,
>Just need the info - i can do the rest. I also, due to my
> business requirements, need to do this as quickly as possible - maybe
> not the expert you perhaps are
No expert at all, according to Tom Lane.
> As it goes I've implemented most of what I wanted in pl/tcl (having
> learned tcl
Michael Ansley <[EMAIL PROTECTED]> writes:
> create function testfunc (text) returns int4 as '
> declare
> sql varchar;
> begin
> sql=''SELECT id AS res2 FROM ''||$1 ;
> execute sql ;
> return res2;
> end;
> ' language 'plpgsql' ;
> Please note the AS syntax rather than INTO.
That won't
"Josh Berkus" <[EMAIL PROTECTED]> writes:
> Thus your only way to get stuff back from EXECUTE is to save
> the results you want to a temporary table (using CREATE
> TABLE AS ...), and read them back using a query. Not
> high-performance, but it gets the job done.
That's not the only way; you c
> Thus your only way to get stuff back from EXECUTE is to save
> the results you want to a temporary table (using CREATE
> TABLE AS ...), and read them back using a query. Not
> high-performance, but it gets the job done.
>
I believe this statement is incorrect, quoting Michael Ansley
<[EMAIL
Rob,
> I figured moving some 'simple' db code from my
> application to it's more
> natural home in the db would work out. Bummer. Not only
> do i have to run
> 7.1 (beta 4) to be able to dynamically generate queries,
> I'm finding it
> *extrememly* difficult to get to get my simple functions
> to
Your missing your fields types, i.e.:
CREATE TABLE media_received (
comp_id SERIAL NOT NULL,
dept_id INT4NOT NULL,
date_recTIMESTAMP DEFAULT 'now',
that should fix your problem...
Michael Fork - CCNA - MCP - A+
Network S
Najm Hashmi writes:
> cmdb=# create table media_received (
> cmdb(# comp_id not null,
> cmdb(# dept_id not null,
^
Those two fields should have a data type. Same in your other examples.
> cmdb(# date_rec timestamp default 'now',
> cmdb(# units int4 default 0,
> cmdb(# media_ty
Title: RE: [SQL] plpgsql grief
Hi, Rob,
From the conversation taht Tom Lane got involved with earlier after my last posting on this toping I think that you need to change your first function to this:
create function testfunc (text) returns int4 as '
declare
sql varchar;
begin
sql=''SELE
On Mon, Feb 12, 2001 at 03:54:39PM +0100, Giovanni Biscuolo wrote:
> I set up a simple database in wich all works well, exept
> one *very* strange (to me) result.
>
> Some time ago I created this views:
>
> CREATE VIEW mag_scaricati_view AS
> SELECT s.id_carico, SUM(s.qta_scaricata) AS Scaricat
Giovanni Biscuolo <[EMAIL PROTECTED]> writes:
> CREATE VIEW mag_scaricati_view AS
> SELECT s.id_carico, SUM(s.qta_scaricata) AS Scaricati
> FROM mag_scarico_tbl s
> GROUP BY s.id_carico;
Grouped views don't work very well in versions before 7.1, though I'm
not sure if that is the issue here
Hubert Palme <[EMAIL PROTECTED]> writes:
> adressen=> CREATE INDEX xxx ON geburtstage (geb_monat(geburtstag));
> ERROR: DefineIndex: (null) class not found
> adressen=>
Apparently you're using 6.5 or older ... I'd recommend updating!
IIRC, in <= 6.5 you *must* specify an operator class for a fu
Hi All,
I am trying to define a new set of tables an I am getting this strange
syntex problem on date, or timestamp data types. I am also getting error on
not null constranit as well... Postgres is behaving strangely first
definations with not null
cmdb=# create table media_received (
cmd
>
> I feel your pain;^)
>
> Here is the text of a post from Tuesday... I think it answers your question
> which is that you cannot do variable subsititution for table or field names
> inside procedures. This is not a Postgres specific limitation, MS SQL
> Server has the same issue.
>
> >
Stephan Szabo wrote:
>
> Functional indexes cannot currently take constant values to the function,
> so it's complaining about the constant 'month'. The current workaround is
> probably to create a function that does the date_part('month', ) for
> you and then use that function in the index crea
I set up a simple database in wich all works well, exept
one *very* strange (to me) result.
Some time ago I created this views:
CREATE VIEW mag_scaricati_view AS
SELECT s.id_carico, SUM(s.qta_scaricata) AS Scaricati
FROM mag_scarico_tbl s
GROUP BY s.id_carico;
CREATE VIEW mag_giacenza1_
Hi, I'm having some real headache problems here. Apologies for the
length, i just want to get it all out now :)
I figured moving some 'simple' db code from my application to it's more
natural home in the db would work out. Bummer. Not only do i have to run
7.1 (beta 4) to be able to dynamically g
I've just spent the last day or two trying to get to grips with plpgsql and can't
believe how abysmal the documetentation and examples are.
I've been trawling through the mailist lists and I notice there was talk back in 1999
abouta PLPGSQL Cook Book - did anything come of this?
If no one is ma
I want to query this...
--> SELECT * FROM bbs ORDER BY ref desc, step ASC LIMIT 12;
this query doesn't refer the index that made by this query.
--> CREATE INDEX idx_bbs ON bbs (ref, step);
but, i change the query that "ref desc" to "ref asc".
then query refer the index, and i can see a result
Stephan Szabo wrote:
>
> Functional indexes cannot currently take constant values to the function,
> so it's complaining about the constant 'month'. The current workaround is
> probably to create a function that does the date_part('month', ) for
> you and then use that function in the index crea
Stephan Szabo wrote:
>
> Functional indexes cannot currently take constant values to the function,
> so it's complaining about the constant 'month'. The current workaround is
> probably to create a function that does the date_part('month', ) for
> you and then use that function in the index crea
rob wrote:
> Hi, I'm having some real headache problems here. Apologies for the
> length, i just want to get it all out now :)
>
> I figured moving some 'simple' db code from my application to it's more
> natural home in the db would work out. Bummer. Not only do i have to run
> 7.1 (beta 4) to b
sir ,
kindly send me the solution of the above query.
1.
To calculate th no. of days between 01/01/2000 to 03/02/2001.
2.
TO calculate th time in newfoundland from centra standard time from
02-22-97 ,05.00 am.
_
Get Your Priv
44 matches
Mail list logo