Hi,
I would like to learn how to write a simple SQL parser and database
program. This is for an embeded situation where I can't use a database
program like postgre. Jumping into the postgre source code seems a
little overwelming as I don't have a general understanding of how this
is done. Is ther
--- [EMAIL PROTECTED] wrote:
> Hi all,
> I have been working on this Informix SQL query which has an outer join.
> I have attached Informix query and my "supposedly" solution to this query
> but I cannot get the same count. I appreciate for any help.
> Thanks.
>
> --Informix query
> select count
Why don't you start by presenting the query in a more readable form
(hint use SQL-standard JOIN syntax for all of your joins) and maybe
narrowing just to a couple of tables to isolate the problem. As it is,
it is hard to understand. In the process of rewriting you will be forced
to think about each
Hi all,
I have been working on this Informix SQL query which has an outer join.
I have attached Informix query and my "supposedly" solution to this query
but I cannot get the same count. I appreciate for any help.
Thanks.
--Informix query
select count(u.id)
from user u, invention i, inv_contracts
On Mon, 2006-11-06 at 17:01 -0600, Aaron Bono wrote:
> On 11/2/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How can I view the privileges that an user or a role has?
>
> Or what is the equivalent of "show privileges" from MySQL?
>
>
> select *
Should be entirely executable in postgres using psql variables (once you
get around the psql quoting weirdnesses). do this:
gp_test=# \set item '\''Apple'
gp_test=# \set qty 6
gp_test=# \echo :item
'Apple'
gp_test=# \echo :qty
6
and then run his query.
Now, i am not sure what DBMS lets Mr. Celk
On 11/2/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
Hi,How can I view the privileges that an user or a role has?Or what is the equivalent of "show privileges" from MySQL? select * from pg_user;Hey guys, this comes up every so often. Could some kind of syntax be added, at least to the psql tool, t
-- Forwarded message --From: Aaron Bono <[EMAIL PROTECTED]>Date: Nov 6, 2006 4:51 PM
Subject: Re: [SQL] refining view using temp tablesTo: BeemerBiker <[EMAIL PROTECTED]>Cc: pgsql-sql@postgresql.org
On 10/31/06, BeemerBiker <[EMAIL PROTECTED]> wrote:
Using postgre with dotnet VS8.
Thanks for I think the list that you are looking for is:
[EMAIL PROTECTED]
--- Mark <[EMAIL PROTECTED]> wrote:
>
> Hi ,
>
>
> Location: San Diego, CA [You can also TeleCommute...]
>
> Duration: 6+ months.
>
>
>
> This is Mark with ProV International, This email is in regards to
Hi
,
Location: San Diego, CA [You can also
TeleCommute...]
Duration: 6+
months.
This
is Mark with ProV International, This
email is in regards to the requirement we have with one of our direct client in
San Diego, CA.
PostgreSQL
Database Developer
This
position involve
On Mon, 2006-11-06 at 14:04, Richard Broersma Jr wrote:
> > Best practice, to me, is to do a couple things. One, create a sequence
> > and set it to the first available pin number. Let's say you have pins
> > available from the number 1 to . Create a default sequence, it'll
> > start on 1.
On Mon, 2006-10-30 at 04:25, Santosh wrote:
> Hi All.
>
> My setup is as follows:
> OS: Sun Solaris 5.8.
> Postgres: 7.2.4
Just so you know, 7.2 is ancient. You should, at a minimum be running
the latest 7.2 release, 7.2.8. You should really look into upgrading to
a later version as soon as poss
> Best practice, to me, is to do a couple things. One, create a sequence
> and set it to the first available pin number. Let's say you have pins
> available from the number 1 to . Create a default sequence, it'll
> start on 1. Then, select nextval('yourseqhere') and use that to fetch
> the
> Could someone suggest me how to get a documentation about Groups and Roles
> and Users ?
>
> It would be nice to see a simple and easy documentation (a tutorial could be
> better, with pgadmin much better).
This is the documentment that I know of:
http://www.postgresql.org/docs/8.1/interactiv
> While reading celko's SQL puzzles (second edition) i followed a reference to
> http://www.dbmsmag.com/9801d06.html.
> There is a puzzle that counts items in boxes.
> When i try to run the proposed solution on PG 8.1.5, PG says: ERROR: column
> reference "qty" is
> ambiguous
>
>
> apparently t
What else do you want to know about it? (keeping in mind the example you gave)
Because, apparently this is just a matter of min and max.
--Imad
On 11/1/06, Raghuraman K <[EMAIL PROTECTED]> wrote:
Hi,
I have a table like this: create
table(xyz char(10), answer number(4)). There are a lot of r
This is *not* a good practice to handle elements of a composite data
type seperately because they all build it up together and without one
of it, the data type is meaningless.
Secondly, If you are going to base our application on this principle,
you better rethink your design.
--Imad
www.Enterpr
"Raghuraman K" <[EMAIL PROTECTED]> writes:
> Hi,
>
>I have a table like this: create table(xyz char(10), answer number(4)).
> There are a lot of rows in this table. I am looking at a query that will help
> me represent the distribution of data records based on the column answer. For
> exa
=?us-ascii?Q?Hubert_Retif?= <[EMAIL PROTECTED]> writes:
> I am migrating my application from MySQL to Postgresql and have met
> following situation:
> ...
> works perfectly in MySQL, but not in Postgresql.
If you want useful help, you need to explain exactly what results you
got and what you expec
On Sun, 2006-10-29 at 10:36, Bobus wrote:
> Hi,
>
> I posted this question to the "general" forum, but then discovered this
> one which I think is more appropriate. Apologies for the cross-post.
>
> We are in the process of porting an application from SQL Server to
> PostgresQL.
>
> We have a t
Hi list,Could someone suggest me how to get a documentation about Groups and Roles and Users ?It would be nice to see a simple and easy documentation (a tutorial could be better, with pgadmin much better).
Regards =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
"Jose" <[EMAIL PROTECTED]> writes:
> If I try use
> select unidade_regiao.(estado_sigla) from unidades
No, you should do
select (unidade_regiao).estado_sigla from unidades
regards, tom lane
---(end of broadcast)---
TIP 7: Y
Can you write the error message here?
--Imad
www.EnterpriseDB.com
On 11/6/06, Hubert Retif <[EMAIL PROTECTED]> wrote:
Hi,
I am migrating my application from MySQL to Postgresql and have met
following situation:
SELECT
(sum(sold_price)/(select sum(sold_price) from car_archive))*100 a
Hi,
I am migrating my application from MySQL to
Postgresql and have met following situation:
SELECT
(sum(sold_price)/(select sum(sold_price) from
car_archive))*100 as CA_pcent,
reason_text
FROM car_archive
group by reason_text
order by CA_pcent desc
works perfectly in MySQL
It is not the answer to your question, but please note that the NATURAL
JOIN may cause problems if the underlaying database structure changes
(for example after a version upgrade). See the following thread for
more information:
http://forums.oracle.com/forums/thread.jspa?threadID=440287
-
While reading celko's SQL puzzles (second edition) i followed a reference to
http://www.dbmsmag.com/9801d06.html.
There is a puzzle that counts items in boxes.
When i try to run the proposed solution on PG 8.1.5, PG says: ERROR: column reference
"qty" is ambiguous
apparently the variable decl
Hi All,I have a stored procedure that fails and don't know how to fix it, so I hope to find some help here.I works on a table called 'locations' that looks like this:design=# \d locations Table "public.locations" Column | Type | Modifiers-+---
Hi All.
My setup is as follows:
OS: Sun Solaris 5.8.
Postgres: 7.2.4
I have very large database, which contain 15 tables and each table is
contain more than 10,00,000 records.
My application is parsing text data files and inserting records into
database.
When this process was running last night
Hi,
I posted this question to the "general" forum, but then discovered this
one which I think is more appropriate. Apologies for the cross-post.
We are in the process of porting an application from SQL Server to
PostgresQL.
We have a table which contains a bunch of prepaid PINs. What is the
be
Hello all,
Is there an existing mechanism is postgresql that can automatically
increment/decrement on a daily basis w/out user interaction? The use
case I'm considering is where a student is in some type of contract with
an instructor of some sort, and that contract puts a time limit on the
s
Hello
I am using postgres r8.1 and i make 2 Composite Types
as:
CREATE TYPE regiao AS (pais_nome
varchar(150), estado_nome
varchar(150), estado_sigla
varchar(4), cidade_nome varchar(150));ALTER TYPE
regiao OWNER TO postgres;==
and
CREATE TYPE telcontato AS
(te
-Original Message-
From: Stephan Szabo [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 31, 2006 10:23 AM
To: Chuck McDevitt
Cc: Tom Lane; beau hargis; pgsql-sql@postgresql.org;
pgsql-hackers@postgresql.org
Subject: Re: [HACKERS] [SQL] Case Preservation disregarding case
On Tue, 31 Oct
On Tue, Oct 31, 2006 at 12:55:46PM -0500, Andrew Dunstan wrote:
> To this you propose, as I understand it, to have a fourth possibility
> which would be spec compliant for comparison purposes but would label
> result set columns with the case preserved name originally used (or
> would you use th
Hi,
How can I view the privileges that an user or a role has?
Or what is the equivalent of "show privileges" from MySQL?
Thanks,
Ray
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-no
I think we've figured out a way to implement the equivalent of a
READPAST hint in a function.
The basic idea is to loop until we find the next available unlocked
row, using the lock_not_available exception to determine if the record
is locked or not. Our early testing seems to indicate that this
Hi,
I have a table like this: create
table(xyz char(10), answer number(4)). There are a lot of rows in this
table. I am looking at a query that will help me represent the distribution of
data records based on the column answer. For example, we may take that the
highest entry for answer co
On Wed, 2006-11-01 at 11:31 -0500, Chuck McDevitt wrote:
> But, stepping back from all that, what is it the users want?
>
> 1) When re-creating a CREATE TABLE statement from whatever catalog
> info, they'd like the names to come back exactly as then entered them.
> If I do:
> CREA
Sorry, my last mail wasn't well thought out. Yes, the
information_schema needs the case-folded name (although it might be ok
to add additional columns to the information_schema for extra
information).
But, stepping back from all that, what is it the users want?
1) When re-creating a CREATE TABL
There was some discussion a couple of years ago on the -hackers list
about it, so you might like to review the archives. The consensus seemed
to be that behaviour would need to be set no later than createdb time.
The options I thought of were:
. current postgres behaviour (we need to do thi
Oh... And Microsoft SQLServer does something similar.
At Greenplum, we've already gotten complaints from customers about this
when they were switching from MSSQL to GP's PostgreSQL-based database.
-Original Message-
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Monday, October 30, 2006
We treated quoted identifiers as case-specific, as the spec requires.
In the catalog, we stored TWO columns... The column name with case
converted as appropriate (as PostgreSQL already does), used for looking
up the attribute,
And a second column, which was the column name with the case exactly as
Using postgre with dotnet VS8. I came up with a scheme of having a web user
search thru the database and selecting into a temp table. Then a further
"refined" search would use the temp table as input and another temp table as
output. Then swap the source and destination so as to not use up reso
At Teradata, we certainly interpreted the spec to allow case-preserving,
but case-insensitive, identifiers.
Users really liked it that way: If you re-created a CREATE TABLE
statement from the catalog, you could get back exactly the case the user
had entered, but people using the table didn't need
43 matches
Mail list logo