I believe the functionality I need (hiding the function code from users)
will be provided with the implementation of the the following item from the
Postgresql todo list:
SERVER-SIDE LANGUAGES
-- Add Oracle-style packages
May be another future functionality will also help out, especially if the
On Feb 4, 2005, at 12:06, Don Drake wrote:
I have a query that shows the top N count(*)'s.
So it's basically:
select some_val, count(*)
from big_table
group by some_val
order by count(*)
limit 50
Now, I would like to have the rank included in the result set. The
first row would be 1, followed by 2
On Thu, Feb 03, 2005 at 09:06:36PM -0600, Don Drake wrote:
> select some_val, count(*)
> from big_table
> group by some_val
> order by count(*)
> limit 50
>
> Now, I would like to have the rank included in the result set. The
> first row would be 1, followed by 2, etc. all the way to 50.
Maybe
I have a query that shows the top N count(*)'s.
So it's basically:
select some_val, count(*)
from big_table
group by some_val
order by count(*)
limit 50
Now, I would like to have the rank included in the result set. The
first row would be 1, followed by 2, etc. all the way to 50.
I can do thi
Perhaps you meant:
http://www.postgresql.org/docs/8.0/interactive/functions-info.html#FUNCTIONS-INFO-SCHEMA-TABLE
in particular |pg_get_serial_sequence|(table_name, column_name)
Sean Davis wrote:
On Feb 3, 2005, at 5:16 PM, lorid wrote:
I could have sworn I kept a copy of prior emails that discus
On Feb 3, 2005, at 5:16 PM, lorid wrote:
I could have sworn I kept a copy of prior emails that discussed how to
get back a value that was just inserted into a autonumber (or in
postgresql case a sequence number)
See here:
http://www.postgresql.org/docs/8.0/interactive/functions-
sequence.html
On Thu, 2005-02-03 at 16:16, lorid wrote:
> I could have sworn I kept a copy of prior emails that discussed how to
> get back a value that was just inserted into a autonumber (or in
> postgresql case a sequence number)
If you know the name of the sequence the number came from you can use
currva
I could have sworn I kept a copy of prior emails that discussed how to
get back a value that was just inserted into a autonumber (or in
postgresql case a sequence number)
any help will be appreciated
thanks
Lori
---(end of broadcast)---
TIP 5: Hav
This is getting ridiculous . . . I dump from the database into another one (just for grins) on the same server to a different name and I don't even get all the info? My functions are coming through fine (finally) but now I've got missing tables and missing data. Could someone point me somewhere
> Much like yourself, I have been searching for a way to create synonyms
> in Postgres. I think that I have found a hack / solution to our
> problem.
...
> What I did, was to make use of the Postgres inheritance feature.
> This in turn effectively creates an alias:
> CREATE TABLE foo (bar int n
Muhyiddin A.M Hayat wrote:
Ok, thanks
But if i would like to display date in one Month,
e.g :
date in feb 2005
You can do that in Pg date arithmetic:
# select '1 oct 2004'::date + '1 month'::interval - '1 day'::interval;
?column?
-
2004-10-31 00:00:00
(1 row)
# selec
I am not running version 8 (I did try this on the linux box as well, but the
version I documented was the server is linux and the client is XP).
I ran it from PG admin in both cases, maybe I need to just run from the
command line on the linux box (this is fine as long as I can backup the file
and
On Tue, 12 Oct 2004 15:04:14 +0200, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Hello !
>
> I am trying to find some informations about the SQL command "create
> synonym".
>
> The command "create synonym" does not exit in the Postgres database.
>
> I had tested with the latest version (postgr
Interestingly, I made a new database on my test server and then was able to do a pg_dump from my mac box to the test server and I think it got just about everything . . . I've got some constraint issues and other oddities happening, but at least my functions came in fine. I used the pipe command t
On Thu, Feb 03, 2005 at 05:31:47AM -0800, Peter Manchev wrote:
> I believe the functionality I need (hiding the function code from users)
Why do you want to hide the function code? Does it contain sensitive
data? As I asked before, what problem are you trying to solve?
--
Michael Fuhr
http:/
Richard Huxton writes:
> Joel Fradkin wrote:
>> ServerVersion: 07.03.0200 PostgreSQL 7.4.6 on i386-redhat-linux-gnu,
>> compiled by GCC i386-redhat-linux-gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2
> OK - let's start here. The syntax here is fine, I just tested it on an
> 8.0 database. Are you sure
On Thu, 3 Feb 2005 12:48:11 -0400 (AST), Marc G. Fournier
<[EMAIL PROTECTED]> wrote:
Perfect, worked like a charm ... but the RETURNS still needs to be a
SETOF, other then that, I'm 'away to the races' ... thanks :)
No SETOF necessary :
CREATE TYPE mytype AS ( number INTEGER, blah TEXT );
Joel Fradkin wrote:
Can anyone help me out on this (I will need to backup and restore the data
base, but am not savy on the proper save and restore syntax). I used the
default ones in PGadmin as detailed below and it blew up on
pg_restore: restoring data for table "tblaction"
pg_restore: ERROR: i
Perfect, worked like a charm ... but the RETURNS still needs to be a
SETOF, other then that, I'm 'away to the races' ... thanks :)
On Wed, 2 Feb 2005, George Weaver wrote:
Hi Marc,
One option is to create a simple data type and return the rowtype of the
datatype
eg CREATE TYPE tserverload AS ("
There are not enough spaces available in the column to allow for the number
of DOC_IDs. There are three spaces, allowing for at most four occurrences
of DOC_ID, but there are eleven. --Rick
Can anyone help me out on this (I will need to backup and restore the data
base, but am not savy on the proper save and restore syntax). I used the
default ones in PGadmin as detailed below and it blew up on
pg_restore: restoring data for table "tblaction"
pg_restore: ERROR: invalid byte sequence
Bradley Miller wrote:
So in the current version I'm running (7.4.6) and I do a pg_dump I have
to then manually manipulate the order by doing a -l to get a table of
contents and then reorder (just changing the first number; or the oid
also??) just to get it to work right? Does anyone else have
Din Adrian wrote:
sorry about cc ...
this is the site:
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
but I gues is not right ... hmm
It's not that it's incorrect, just that you should always use the
manuals as a starting point.
On Thu, 03 Feb 2005 14:52:04 +, Richar
sorry about cc ...
this is the site:
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html
but I gues is not right ... hmm
Adrian Din
On Thu, 03 Feb 2005 14:52:04 +, Richard Huxton
wrote:
I'll repeat myself:
Please CC the mailing list as well as replying to me, so that o
Hi,
It is not spaces problem.
I needet to dump the data and I deleted all rows for 'DOCID' with
delete from a_constants_str where constname= 'DOCID'; and the pg
reported 10 rows deleted.
Sorry I can not execute the commend now ( I dropped the data, becaus I
needet the uniqu constnames for the
So in the current version I'm running (7.4.6) and I do a pg_dump I have to then manually manipulate the order by doing a -l to get a table of contents and then reorder (just changing the first number; or the oid also??) just to get it to work right? Does anyone else have these issues? How exactl
On Feb 3, 2005, at 21:53, pginfo wrote:
I am using pg 7.4.5 on RedHat AS 3.0.
sklad21=# \d a_constants_str
Table "public.a_constants_str"
Column | Type | Modifiers
+---+---
constname | character varying(30) | not null
fid
Hi ,
I am using pg 7.4.5 on RedHat AS 3.0.
I am using it via jdbc and jboss.
I have found big problem about the way pg supports primary keys.
The bug was reported from my customers ( we are installed pg with our
ERP on ~ 500 costomers) and I do not know hot it is happen.
sklad21=# \d a_constants_
Please cc: the list when you reply to me - that way others can help too.
imam wrote:
If this is a left outer join, you could do something like:
SELECT
...
FROM
pe_pop_sr_posted_tran_head t1
LEFT JOIN
pe_pop_po_header t2
ON
t1.po_header_pk = t2.po_header_pk
LEFT JOIN
pe_pop_sr_posted_tran_det t
imam wrote:
The following is a sybase query and i am trying to convet it into
postgres but in postgres the join will be specified in from clause
and we cannot specify any logical operator
i would be grateful if you could tell me the solution for it
You don't actually say what your query is trying t
30 matches
Mail list logo