pg_dump, ok.
pg_restore, don´t restore. Why?
Red Hat 9, Fedora, Conectiva 9 and Postgres 7.4.1
make my ambient use.
pg_restore -i -v -N -etc... return:
Droping... error! Object does not
exist...
OR
Creating... error! Object exist with the same
arguments...
What about something like this:
select * from test order by tx_date desc limit 1
Yudie
- Original Message -
From: "Edmund Bacon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 5:09 PM
Subject: [SQL] Help refining/eliminating recursive selects
I have
On Thu, 19 Feb 2004, Edmund Bacon wrote:
>
> I have the following table:
>
> create table test (
> idserial primary key,
> product integer,
> tx_date date,
> quantity integer)
>
> with the following data:
> id | product | tx_date | quantity
> +-+---
I have the following table:
create table test (
idserial primary key,
product integer,
tx_date date,
quantity integer)
with the following data:
id | product | tx_date | quantity
+-++--
1 | 1 | 2004-01-01 | 10
2 |
"scott.marlowe" <[EMAIL PROTECTED]> writes:
> Oh, and update your version of postgresql. There's a nasty "won't
> startup" bug in 7.3.2 you'd just as soon rather avoid.
Actually I think the "won't start" bug was in 7.3.3 :-(. Still, it's
good advice to keep up with the latest version in your re
On Thu, 19 Feb 2004, scott.marlowe wrote:
> On Thu, 19 Feb 2004, Brian Knox wrote:
>
> > ( sorry if this is a repeat, my mail server is being wonky today )
> >
> > I'm looking for a way, within SQL, given a starting date and an ending
> > date, to get back the number of months between the start
On Thu, 19 Feb 2004, Brian Knox wrote:
> ( sorry if this is a repeat, my mail server is being wonky today )
>
> I'm looking for a way, within SQL, given a starting date and an ending
> date, to get back the number of months between the start and end date.
> If I "SELECT end_date - start_date",
Rodrigo Sakai wrote:
AFAIK there's not much you can do for obfuscation of pl functions right
now since someone will be able to see the src text in pg_proc. However,
are you allowing people that you don't want to see the code access to
write arbitrary sql to the database?
Let me explain myself a
( sorry if this is a repeat, my mail server is being wonky today )
I'm looking for a way, within SQL, given a starting date and an ending
date, to get back the number of months between the start and end date.
If I "SELECT end_date - start_date", I get back an interval in days; I
need months.
T
elein <[EMAIL PROTECTED]> writes:
> Somewhere the space trimming occurs.
The cast from char(n) to text (or varchar) is what's doing the trimming
in 7.4. I think you can mostly revert the change by changing that
pg_cast entry to specify no conversion function instead of rtrim().
However that would
Thanks Josh,
I'll do that, I just wasn't sure if I was missing something obvious.
Jeremy
-Original Message-
From: Josh Berkus [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 2:29 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [SQL] DISTINCT ON troubles
Jeremy,
>
Jeremy,
> Am I just approaching this all wrong and need to create a temporary table
> and draw from that, or is there a way to salvage this query?
Think about using a subquery instead of the DISTINCT ON approach. I don't
think you can get what you want with DISTINCT ON.
A temporary table is n
Rodrigo,
> I insist in my question, is there a way to compile the plpgsql codes or
something like that, or its better to think about writting this postgres
functions in C??
No, there is not. Nor is there likely to be for any PL, as it would add
significant overhead for no real gain.
Y
Rodrigo Sakai wrote:
I insist in my question, is there a way to compile the
plpgsql codes or something like that
no
think about writting this postgres functions in C??
yes
Joe
---(end of broadcast)---
TIP 9: the planner will ignore your desire
Philippe Lang wrote:
I need to do something similar to a cross tabulation, but without any
aggregation.
See the crosstab() function found in contrib/tablefunc
Joe
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister
I guess I am asking about the cast sequence from
char(n) to text.
(' '::char(n))::text trims spaces. This is wrong, imo.
' '::text does not trim spaces.
' '::char(n) does not trim spaces and pads.
char(n) should not trim spaces, right? And
it doesn't on an inser
>AFAIK there's not much you can do for obfuscation of pl functions right
>now since someone will be able to see the src text in pg_proc. However,
>are you allowing people that you don't want to see the code access to
>write arbitrary sql to the database?
Let me explain myself a little better. Ac
Hi,
I have a query that reads:
SELECT DISTINCT ON (messageboard.threadid) messageboard.threadid,
messageboard.topic, owner.ownerid, owner.username FROM messageboard, owner
WHERE messageboard.ownerid=owner.ownerid AND messageboard.leagueid =
'$leagueid' ORDER BY messageboard.messageid DESC LIMIT $
On Thursday 19 February 2004 16:02, Philippe Lang wrote:
> Hello,
>
> I need to do something similar to a cross tabulation, but without any
> aggregation.
Have a look in the contrib/ folder of the source distro (or your contrib
package). There are some set-returning tablefunc examples. Also you m
Here is a solution:
-- QUERY
SELECT
master_name,
CASE WHEN type = 'TA' THEN detail_name END as TA,
CASE WHEN type = 'TB' THEN detail_name END as TB,
CASE WHEN type = '
On Wed, 18 Feb 2004, George A.J wrote:
> Hi all,
>
> i am using PostgreSQL 7.3.2. How can i do distributed transactions in PostgreSQL.
> is there a transaction coordinator available for Postgres..
there isn't one, really, but you could likely roll something that worked.
Oh, and update your v
On Thu, 19 Feb 2004, Rodrigo Sakai wrote:
>Hi, I'm responsable for the database here in the company, and I like
>to know if is there a way to compile my pl/pgsql functions, its not a
>performance problem, it is more a security problem, i don like to
>have somebody looking into my c
Hello,
I need to do something similar to a cross tabulation, but without any
aggregation.
Here is an example:
-- TABLE DEFINITION
CREATE TABLE public.type
(
code char(1)
So use Grant more wisely.
- Original Message -
From: "Rodrigo Sakai" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 19, 2004 2:44 PM
Subject: [SQL] Compiling pl/pgsql functions
>Hi, I'm responsable for the database here in the company, and I like to
know if is
Hi, I'm responsable for the database here in the company, and I like to know if is
there a way to compile my pl/pgsql functions, its not a performance problem, it is
more a security problem, i don like to have somebody looking into my codes and see the
company rules.
Is there a way to do th
25 matches
Mail list logo