Anthony Chavez <[EMAIL PROTECTED]> writes:
> What I've got here are a couple of ON INSERT rules for a view. The
> second rule is what I'm concerned about. I wrote it with PostgreSQL's
> ACID compliance in mind, but can I trust it?
Oops, forgot
_id rather
than address_lines_id_seq.last_value, it would be replaced by
nextval(address_line_id_seq), so I'm trying to work around that.
If there is there a better way to do this, I'm all ears. Would
lastval() work for me in this case? Thanks!
--
Anthony Chavez http://
In your case Survey , Categories, Questions and Answers TABLES are parents tables, and Question_answers TABLE is a Child Table. Since you want to have survery, from Survey Table, Category from Category Table, Question from Question Table and Answer from Answer Table and alll these Atributes ar
-SQL 2000. Thanx Anthony Kinyage
Try the all-new Yahoo! Mail . "The New Version is radically easier to use" The Wall Street Journal
will be the only
vendor to do so (though, this seems like a very MySQL-ish thing to do
so maybe not just Postgres)
take care,
Anthony
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, October 14, 2005 3:21 AM
To: Anthony Molinaro
Cc: Greg Stark; Scot
CUBE, ROLLUP),
but not now...
then again, oracle is 100% completely driven by money, so, if enough
customers ask for it, it will happen eventually. I just can't imagine
anyone asking for this feature when we're paying 40k per cpu just to
run oracle; there are much more important things f
ther than for saving some typing...
Seems more trouble than it's worth and changes a concept that's tried
and true for many years.
Regards,
Anthony
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane
Sent: Thursday, October 13, 2005 2:50
we'd hope that the source code developers for pg/oracle/db2 etc
are focusing on more important things, not rewriting things that already
work because something doesn't wanna type out column names...
regards,
Anthony
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PR
group by
are:
1. constants and deterministic functions
2. scalar subqueries
3. window functions
1 - because the value is same for each row
2&3 - because they are evaluated after the grouping takes place
regards,
Anthony
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PR
in the group, (excluding constants and the like)
is just silly.
OTOH, if you're all poking fun at a mysql bug that they try to pass
off as a feature, then yes, I'm a clod and I missed that the first time
around :)
Regards,
Anthony
-Original Message-
From: [EMAIL PROTECTED] [mailto
he standard states that you can leave out the pk from a group
by,
They are wrong too, as the simple examples above prove.
Fyi, Oracle just bought innodb, so, I'd not be too concerned with mysql
and they so called "features" anyway.
Regards,
Anthony
-Original Message-
From:
> I don't see why you think people stumble on this by accident. I think
it's
> actually an extremely common need.
I can't imagine how that's a common need at all.
It makes no sense.
When you add an additional column in the select, it must be included in
the group by as it changes the meaning of
> Not always, but I'd rather get the right answer with difficulty than
the
wrong one with ease. :)
agreed.
I made it a point to mention this so called "feature" in my book.
This is a bug they never fixed and they decided to call it a feature.
It is, imo, *ridiculous*.
You're 100% correct, this is a bug in mysql.
Sadly, they tout this as a feature!
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Rick Schumeyer
Sent: Tuesday, October 11, 2005 5:12 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] pg, mysql comparison with "
both tables, you may wanna try an anti
join:
select m.id
from messages m
left join
usermessages um
on ( m.id = um.id )
where um.id is null
both techniques can be visciously efficient.
good luck,
Anthony
-Original Message-
From
ns don't get to production ;)
Regards,
Anthony
-Original Message-
From: Daryl Richter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 27, 2005 11:35 AM
To: Anthony Molinaro
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] how to do 'deep queries'?
Anthony Molinaro wrote:
&
with clarity nor any developers I've worked with.
So, I don't at all get what you're saying...
Old style is short and sweet and perfect.
Ansi dumbed it down, that's the bottom line.
And for people who've been developing for sometime,
It's wholly unnecessary.
Rega
,
Anthony
-Original Message-
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jeff sacksteder
Sent: Monday, September 26, 2005 8:34 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] how to do 'deep
queries'?
Is there supported syntax to do 'deep' queries? Tha
Michael,
You practically solved it yourself in the subject of the email ;)
select replace('abcd','b','') from your_table;
Hope that helps,
Anthony
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of "Michael Höller&qu
ht be just fine.
10k rows should not be a problem for either method,
assuming you have an index on statusid and bill_id.
Give it a spin and update this thread.
Regards,
Anthony
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 8:08 AM
I am concerned about is the technique.
hope that helps,
Anthony
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 5:45 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Time differences between rows, not colu
is it possible to dump within procedural language/SQL syntax? Using pg_dump from
console is very confusing for some end user who don't have Linux skills. so I decide
to create a function to do that, and they may call it from my application.
Thanks
William
Need a new email address that people
.test
or
set search_path to $1
select * from test
or maybe I defined a string variable to hold it,
workschema='D200402'
select * from workschema.test
Do they work?
Thanks,
William
>On Wed, 12 May 2004, William Anthony Lim wrote:
>
>> Christoph,
>>
>> First,
Christoph,
First, is it safe for multi user? I mean maybe first user need working with D200402,
second one need with D200403, if I do this in first user connection:
SET search_path to D200402 ;
does it affect to the second user search path?
Second, I want it dinamic. So, if I want to using D2
Hi all,
I'm just experimenting with schema usage. I'm going to use it as a fake
'multi-database' system. Is Postgresql support coding schema name using string
variable so I can pass it with parameter? I'm give u an example:
I have schema: D200401,D200402.D200403,D200404, etc.
I've set my user
Hi,
I'm using PGSQL 7.4.1 and JDBC 75dev client.
I want to ask about PL/PGSQL function returning resultset.
I read in the docs, there are 'setof' and 'refcursor' method,
is there another method to returning resultset?
What advantages and disadvantages for each method?
Which is the best?
Plz exp
Hi,
I have a little trouble. I'm newbie in postgresql.
Consider this function example:
create or replace function testcall(int4,varchar,bool,int2) return setof record as '
declare
r record;
a int4;
b varchar;
c bool;
d int2;
begin
a=$1;
b=$2
hing the archives, but there is a database error
("PQconnectPoll() -- connect() failed: Connection refused Is the
postmaster running (with -i) at 'db.hub.org' and accepting connections
on TCP/IP port 5439?"), just so someone knows.
Thanks In Advance,
Anthony Bouvier
I know that there's an "average" function (avg) for some datatypes.
Is there something comparable for float or int arrays?
e.g.
select avg(time_instants[1:5]) from ellipse_proc where rep = 1;
time_instants
-
{"148","167.8","187.6","207.4","227
Kenn Thompson wrote:
> Ok- messy, but it works
>
> CREATE VIEW testview AS
> select distinct area from areapostcode where postcode like 'BS1%';
>
> SELECT COUNT(*) FROM testview;
>
> kenn
>
> >>> Anthony <[EMAIL PROTECTED]> 11/27
Najm Hashmi wrote:
> Anthony wrote:
>
> > Michael Fork wrote:
> >
> > > I think you want
> > >
> > > SELECT count(distinct(area)) FROM areapostcode WHERE postcode LIKE 'BS1%'
> > >
> >
> > psql still not happy :(
>
Tom Lane wrote:
> Anthony <[EMAIL PROTECTED]> writes:
> > select count( distinct area ) from areapostcode where postcode like
> > 'BS1%'
> > the above statement fails with
> > ERROR: parser: parse error at or near "distinct"
>
>
ar "select"
Thanks, any more ideas?
>
> >>> Anthony <[EMAIL PROTECTED]> 11/27/00 12:24PM >>>
> Jose Rodrigo Fernandez Menegazzo wrote:
>
> > > The problem I have is with this statement:
> > >
> > > select count( d
;distinct"
Thanks,
Bap.
>
> Michael Fork - CCNA - MCP - A+
> Network Support - Toledo Internet Access - Toledo Ohio
>
> On Mon, 27 Nov 2000, Anthony wrote:
>
> > Apologies if this has been asked b4, but got this result when
> > attemplting to search the arch
Jose Rodrigo Fernandez Menegazzo wrote:
> > The problem I have is with this statement:
> >
> > select count( distinct area ) from areapostcode where postcode like
> > 'BS1%'
> >
> > the above statement fails with
> > ERROR: parser: parse error at or near "distinct"
> >
> > I am not the g
Apologies if this has been asked b4, but got this result when
attemplting to search the archives on the website
Not Found
The requested URL /mhonarc/pgsql-sql/search.cgi was not found on this
server.
Apache/1.3.12 Server at postgresql.rmplc.co.uk Port 80
The problem I have is with this statem
Thanks Darrin and Stuart.
-Tony
Darrin Ladd wrote:
> Here's what you are looking for:
>
> SELECT pg_class.relname
> FROM pg_class, pg_attribute
> WHERE pg_attribute.attname = 'area'
> AND pg_attribute.attrelid = pg_class.oid;
>
> This should give you all of the classes (tables) which have th
I have a database with several tables. I'd like to pull out a list of
names for the tables that contain the field (class) name 'area'.
Can this be done?
-Tony
38 matches
Mail list logo