mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Subject: [HACKERS] Small patch to pgtclCmds.c Hi I have made the following small change to the extensions I made to pgtclCmds.c quite a while ago. At the moment there is a -assignbyidx option to pg_result assigning the returned tuples to an array by using the 1st field of the select statement as the key to the array. eg "select name,age from vitalstatistics" will result in an array with myarray(peter) = 32 myarray(paul) = 45 Often I need to have a pseudo-multi dimentional array eg. "select name,age from vitalstatistics where occupation='plummer' I would like to be able to generate an array newarray(peter,overpaid) = 32 So to add a arbitrary string to the key value I have extended pg_result $res -assignbyidx $arrayname to have an optional argument pg_result $res -assignbyidx $arrayname $appendstr So that that string is appended to the key value.
PostgreSQL Data Base Management System (formally known as Postgres95) This directory contains the 6.0 release of PostgreSQL. See INSTALL for the installation notes and HISTORY for the changes. We also have a WWW home page located at: http://www.postgreSQL.org PostgreSQL is not public domain software. It is copyrighted by the University of California but may be used according to the licensing terms of the the copyright below: ------------------------------------------------------------------------ POSTGRES95 Data Base Management System Copyright (c) 1994-6 Regents of the University of California Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
Languages
C
85.3%
PLpgSQL
5.9%
Perl
4.4%
Yacc
1.2%
Meson
0.7%
Other
2.2%